> -----Original Message----- > From: Mike Singleton [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 10, 2002 11:16 AM > To: [EMAIL PROTECTED] > Subject: bareword error > > > What am I fumbling here?? > Errror: Bareword 'OUTFILE' not allowed while "strict subs" in use. > == Start == > #! perl -w > use strict; > my @files = glob('3D21*.log'); > fopen(OUTFILE,">>myfile.csv");
That should be open(), not fopen(). That's what's causing the error. > while(<@files>){ Do you mean to be opening each of the log files and reading through them? This won't do it. If you set @ARGV to the list of file names, you can use the special while(<>) { notation to accomplish this. > my @f = split /s+/,$_,9; Do you want to split on the letter 's', or on whitespace? If the latter, use split /\s+/, $_, 9; or split ' ', $_, 9; But read 'perldoc -f split' for the slight difference between these. > print OUTFILE join(',',@f)."\n"; > } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]