in reply to writing an array of data to a file

Greetings back O seeker of wisdom.

Your basic problem is the while loop. Remove it and see what happens:

open(OUTPUTFILE, '>$position_output_path') or die "Could not open $position_output_path:$!\n"; print OUTPUTFILE @rows; close(OUTPUTFILE) or die "Could not close $position_output_path:$!
open(OUTPUTFILE, ">$position_output_path") or die "Could not open $position_output_path:$!\n"; print OUTPUTFILE @rows; close(OUTPUTFILE) or die "Could not close $position_output_path:$!

-derby

Update: Need double quotes as davorg points out below.

Replies are listed 'Best First'.
Re^2: writing an array of data to a file
by davorg (Chancellor) on Aug 14, 2006 at 15:39 UTC

    That still opens and writes to a file called "$position_output_path" - and I doubt that's what the original poster wants :-)

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg