Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug a perl script used inside another perlscript?

Tags:

debugging

perl

How to debug a perl script used inside another perlscript. We can debug both separately. Is it possible to debug in one step?

Ex:

!/user/bin/perl

my $param= 8;

my @res=\`perl extract.pl $config`;

print "The results is ....  @res\n";

Similarly, can we debug the perl scripts used inside shell script?

Thanks.

like image 304
Bibek Sahu Avatar asked Dec 18 '25 18:12

Bibek Sahu


1 Answers

You can add -d switch to the shebang line of the script you are invoking:

#!/usr/bin/perl -d
like image 81
perreal Avatar answered Dec 21 '25 12:12

perreal