Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to write an array called @rows to an output file $position_output_path, like so:
The array is definitely not empty, and I have definitely given write permission to the output file. However, when I check the contents of the file, there is nothing there.open(OUTPUTFILE, '>$position_output_path') or die "Could not open +$position_output_path:$!\n"; while (<OUTPUTFILE>) { print OUTPUTFILE @rows;} close(OUTPUTFILE) or die "Could not close $position_output_path:$! +\n";
Could someone tell me what depressingly newbish mistake I'm making?
Kind regards
C J
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: writing an array of data to a file
by davorg (Chancellor) on Aug 14, 2006 at 15:32 UTC | |
Re: writing an array of data to a file
by davido (Cardinal) on Aug 14, 2006 at 15:35 UTC | |
by Anonymous Monk on Aug 14, 2006 at 15:48 UTC | |
Re: writing an array of data to a file
by derby (Abbot) on Aug 14, 2006 at 15:31 UTC | |
by davorg (Chancellor) on Aug 14, 2006 at 15:39 UTC | |
Re: writing an array of data to a file
by McDarren (Abbot) on Aug 14, 2006 at 15:33 UTC | |
Re: writing an array of data to a file
by GrandFather (Saint) on Aug 14, 2006 at 21:12 UTC | |
Re: writing an array of data to a file
by mickeyn (Priest) on Aug 14, 2006 at 17:33 UTC |