We don't bite newbies here... much | |
PerlMonks |
Re: Output to file questionby swkronenfeld (Hermit) |
on Jul 21, 2004 at 23:35 UTC ( [id://376415]=note: print w/replies, xml ) | Need Help?? |
I just want to mention, since it sounds like you are a beginner in Perl, that the method given by ysth will overwrite the contents of your file. If you want to append to a file, you need to open the file as
open my $handle, ">> filename" or die "Couldn't open file: $!"; Note the ">>" instead of ">". You can print anything else to the file using
until the close command is executed on $handle.
In Section
Seekers of Perl Wisdom
|
|