Results 1 to 2 of 2
I've got something pretty simple I need to do with a perl script but can't quite figure it out. I need to print something like the following:
Code:
print "thing1\n";
...
- 07-19-2010 #1
Basic Perl Redirect question
I've got something pretty simple I need to do with a perl script but can't quite figure it out. I need to print something like the following:
I need the output of that piped into a file, however I can't simply do perlscript.pl > file.txt because there are other things that this script will be outputting that do not need to be piped to the file.Code:print "thing1\n"; print "thing2\n"; print "thing3\n";
- 07-19-2010 #2Just Joined!
- Join Date
- Jul 2010
- Location
- Adelaide, Australia
- Posts
- 3
if you need to write data to a file, you should open a file handle and write to it using Perl, try reading the perldoc page on the open() function.


Reply With Quote