#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