Try this:
sub capture{ my $FILE = $_[0]; warn "FILE=$FILE"; $fileContent = ` cat $DIR_INPUT/$FILE `; warn "AFTER=$FILE"; print $fileContent; # it stops here }
Also, are you seeing the incomplete page source in your browser, or are you running the script from the command line? If from the browser, check your error log. There is probably information in that file that lists what is going wrong. If a die or something failed and killed the program, this might give a clue where the problem lies.
You could also set select STDOUT; $|=1 in your code to ensure that everything is forced out to STDOUT, or you may be suffering from buffering.
--MidLifeXis
In reply to Re: Perl Script stops in middle of execution, no error messages
by MidLifeXis
in thread Perl Script stops in middle of execution, no error messages
by MatheusAA
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |