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
>> 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
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
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