open(OUTFILE,">myfile.csv");
while(<@files>){
   my @f = split /s+/,$_,9;
   print OUTFILE join(',',@f)."\n";
}

should work.

-----Original Message-----
From: Mike Singleton [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 09, 2002 1:33 PM
To: [EMAIL PROTECTED]
Subject: progress!


Using the following code, how would I write it's output to a single csv
file??

=== Start===
use strict;
my @files = glob('3*.log');
while (<@files>) {
        my @f = split /\s+/, $_, 9;
        print join ',', @f;
}

__END__

==== End Code ====


DaVita Inc.
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to