J
joe shaboo
I'm trying to output the STDOUT to a file which is the same as the
file I'm reading.
The way I'm handling it now is sloppy, and I'd like to do it all
inside the perl script.
Here's an example.
$file = filename
while (<$file>) {
print $_;
}
Then from the command line, I do $./script file > file1;mv file1 file
This is terrible, and I know it is easy, but I can't get it to work
with open(), and I'm sure you can, I just can't get it to work.
Can anyone help me out?
file I'm reading.
The way I'm handling it now is sloppy, and I'd like to do it all
inside the perl script.
Here's an example.
$file = filename
while (<$file>) {
print $_;
}
Then from the command line, I do $./script file > file1;mv file1 file
This is terrible, and I know it is easy, but I can't get it to work
with open(), and I'm sure you can, I just can't get it to work.
Can anyone help me out?