in reply to Using Filehandles #2
To output text to a file, you simply do:
open FILEHANDLE, "> $filename" or die "Can't write to $filename: $!\n" +; print FILEHANDLE "Whatever you're printing"; close FILEHANDLE;
The Filehandle module allows you to treat filehandles like regular scalars, but it sounds like you don't need such functionality for what you want to do. And yes, you *must* specify a file to which you're going to write; but if you want to build all of your data up first, you should be saving it into an array or string. Read up on open and print for more info.
HTH
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
|
|---|