in reply to writing an array of data to a file

You're confusing reading of files with writing to files. Use the diamond operator (<OUTPUTFILE>) to read from a file. When you're writing to a file, there's no need to use the diamond operator, and in fact it won't work to use it.

Here's how to do it:

open( OUTPUTFILE, '>', $position_output_path ) or die "Couldn't open $position_output_path\n$!"; foreach my $row ( @rows ) { print OUTPUTFILE $row, "\n"; } close( OUTPUTFILE ) or die "Couldn't close $position_output_path\n$!";

That ought to do the trick!


Dave

Replies are listed 'Best First'.
Re^2: writing an array of data to a file
by Anonymous Monk on Aug 14, 2006 at 15:48 UTC
    Thanks, folks! *slaps head*