In trying to come up with a solution to print 'more'., I found myself looking at the results of this one-liner:
Win32:
perl -e"open STDOUT, '| more'; print qq($_\n) for (1..1000)"
Unix:
perl -e'open STDOUT, "| more"; print qq($_\n) for (1..1000)'
Can anyone explain what the heck is happening around line 850 or so (the exact line seems to vary depending on your OS and possibly on your window size)? I thought perhaps it had something to do with buffering, but adding a
$|++ in there doesn't seem to affect it a-tall.
"One word of warning: if you meet a bunch of Perl programmers on the bus or something, don't look them in the eye. They've been known to try to convert the young into Perl monks." - Frank Willison