open FILE, "> somefile.txt" or die $!; print FILE join "\n", @array; close FILE;
Or:
{ local $, = "\n"; open FILE, "> somefile.txt" or die $!; print FILE @array; close FILE; }
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to Re: create a file from an array
by Ovid
in thread create a file from an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |