in reply to Re: Saving an array to a disk file
in thread Saving an array to a disk file
Just a quick question because I don't know if perl would optimize that code but... would the join not be a bit onerous if the array is very large? (Also, cleaned up teh code a little.)
Perhaps a foreach loop?
use strict; use warnings; my @array = ('array','stuff','here'); open OUTFILE, '>', 'filename' or die "Couldn't create filename: $!"; print OUTFILE $_,"\n" foreach @array; close OUTFILE;
Update: D'oh. Cleaned up my comment a little... would help if I could type
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Saving an array to a disk file
by GrandFather (Saint) on May 26, 2006 at 03:55 UTC | |
by chromatic (Archbishop) on May 26, 2006 at 06:21 UTC | |
by meraxes (Friar) on May 26, 2006 at 04:02 UTC | |
by blazar (Canon) on May 26, 2006 at 10:39 UTC |
In Section
Seekers of Perl Wisdom