E
Ed Mancebo
I have a short perl script, it goes like this:
#!/usr/bin/perl
$line = <STDIN>;
print $line;
`echo $line > output`;
I was expecting it to read a line from std. input, then output the line
to the screen and to a file named 'output'. When I try this, the
output file is always empty, even though the print statement works.
Can someone tell me why?
Thanks,
Ed
#!/usr/bin/perl
$line = <STDIN>;
print $line;
`echo $line > output`;
I was expecting it to read a line from std. input, then output the line
to the screen and to a file named 'output'. When I try this, the
output file is always empty, even though the print statement works.
Can someone tell me why?
Thanks,
Ed