Does this script only output on the condition that ALL the variables after
the 'if' are met??

== Start ===
use strict;
my $JOBSTART = 'SNBJH_3203J';
my $CONDSTART = 'CONDSTART';
my $JOBEND = 'SNBJH_3211J';
my $CONDEND = 'SNBJH_3045E';
my $JOBCANC = 'SNBJH_3258J';
my $XFER = 'SNBJH_3710J';
my $VOLUSED = 'SNBJH_3320J';

opendir DIR, '.' or die "opendir: $!";
my @files = grep /^3D2.*\.log$/i, readdir DIR;
closedir DIR;

print "files=@files\n";
open OUT, ">myfile.csv" or die "openCSV: $!";
foreach (@files) {

 print "opening $_\n";
 open IN, $_ or die "open $_: $!";
 while (<IN>) {
  my @f = split /\s+/,$_,9;
   print "parsing $_\n";
                 print OUT join (',', @f) . "\n" if
/$JOBSTART|$CONDSTART|$JOBEND|$CONDEND|$JOBCANC|$XFER|$VOLUSED/;

 }
 close IN;

close OUT;
}
== End==




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

Reply via email to