I have two Perl scripts — let's call them script.pl and script2.pl.
script2.pl updates to the command line, as in:
print "Progress $progress percent...\r"; In order to get this to work I had to turn on autoflush at the start of script2.pl:
$|++; Now, the problem arises because I have to have script2.pl called from script.pl, and this — the updating/flushing — only seems to work when script2.pl is run directly, not when it's called from script.pl.
I've tried various ways of calling script2.pl, from system() to backticks and in no case does the updating happen.
Am I missing something about handling stdout output when one Perl script is called from another?
script2.plfrom withinscript.pl?`script2.pl`in backticks.