Like this??

@array = qw(one two three four);

open FILE, ">c:\\out.txt" or die "Can't create c:\\out.txt: $!";
foreach $element(@array) {
        print FILE "$element\n";
}
close FILE;

-----Original Message-----
From: Ron Smith [mailto:[EMAIL PROTECTED]]
Sent: 26 July 2001 09:36
To: [EMAIL PROTECTED]
Subject: array contents to a file


Could someone provide a snippet of code that reads the contents of an array 
to a text file.

Thanks,
Ron

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------Confidentiality--------------------------.
This E-mail is confidential.  It should not be read, copied, disclosed or
used by any person other than the intended recipient.  Unauthorised use,
disclosure or copying by whatever medium is strictly prohibited and may be
unlawful.  If you have received this E-mail in error please contact the
sender immediately and delete the E-mail from your system.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to