We don't bite newbies here... much | |
PerlMonks |
Print Problem: Progress Printout Preventedby pobocks (Chaplain) |
on Jan 06, 2009 at 08:18 UTC ( [id://734367]=perlquestion: print w/replies, xml ) | Need Help?? |
pobocks has asked for the wisdom of the Perl Monks concerning the following question: Update: The problem was that, even with autoflush set, the <> operator expects a newline before it returns. Thanks to Ikegami and Bart, for slapping the solution into my head, and to Ikegami in particular for his much saner 'open'. Also, I feel it only just to point out that they both had suggestions that essentially turn this into a single-line program; the simplest solution being to simply exec('mencoder', $arg1, ..., '-o', $arg2); I fall, another victim of overengineering through ignorance/inexperience/4AM thinking. I'm writing a small convenience script that is essentially a wrapper for single run of mencoder. I have something that works, in that it runs mencoder with the proper options and arguments. My problem is passing what mencoder is printing back out through Perl to the console. Note, most of the output is passed through fine. It's only that the constantly updating progress line at the bottom doesn't get printed, ever. Here's the code. It's meant to convert a video file into the proper format to run on my new Creative Zen (Xmas present) if anyone cares ;-)
for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";
Back to
Seekers of Perl Wisdom
|
|