#!/user/bin/perl -w use win32; #use strict; use warnings; my $infile="dump1.txt"; my $outfile="newdump.txt"; my @x=(); open(FILE, $infile) or die "log560.pl can't open $infile for reading: $!"; open(OUTPUT,">$outfile") or die "log560.pl can't open $outfile for writing: $!"; #Look only at the summary lines where $_ == 560 while (defined ($_ = )) { next unless ($_ =~ /560/); #we only want the files with 560 $_ =~ s/`/,/g; #this is here to get the user name because ' is after name @x=split(/,/); if (!($x[16] =~ /Primary User Name: CISERFS1/)) { #dont want the details from the sytem my $date=$x[1]; #good my $time=$x[2]; #good my $disk=$x[12]; #good my $user=$x[16]; #good print OUTPUT "$date $time $disk $user \n"; #good } #end if the one WAY up there the one for ciserf1 } # end while close FILE;