Re: a question about output

2002-11-24 Thread Jeff 'japhy' Pinyan
rather than >STDOUT, which should be done with something like: > > open(FILE, ">result") or die "$!"; > print FILE `ls`; > close FILE; GAH! I'm a moron, and didn't even read the question. :( I saw print() and system() mingled and assumed it

Re: a question about output

2002-11-24 Thread Chris Ball
>> how can I output "first line\n" and "last line\n" to the screen >> but save the result of system command "ls" to a file(eg >> "result")(not appear on the screen")? >> On 24 Nov 2002 23:42:50, Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> said: > Unbuffer STDOUT: > $| = 1; > See 'p

Re: a question about output

2002-11-24 Thread Jeff 'japhy' Pinyan
On Nov 24, stanley said: >print "first line\n"; > >system ("ls"); > >print "last line\n"; >how can I output "first line\n" and "last line\n" to >the screen but save the result of system command "ls" >to a file(eg "result")(not appear on the screen")? Unbuffer STDOUT: $| = 1; See 'perldoc per

a question about output

2002-11-24 Thread stanley
hi all, my script: #!/usr/bin/perl use strict; print "first line\n"; system ("ls"); print "last line\n"; how can I output "first line\n" and "last line\n" to the screen but save the result of system command "ls" to a file(eg "result")(not appear on the screen")? thanks Stan