# untested snippet my @good_lines,@bad_lines; foreach my $file_name (@file){ open(MYFILE, $file_name) or die qq(Cannot open '$file_name' : $!\n); # Read the whole file into memory my @lines = ; # And find the good and bad lines push @good_lines, grep { ! /NOT|INVALID|MUST|ERROR/ }, @lines; push @bad_lines, grep { /NOT|INVALID|MUST|ERROR/ }, @lines; }; print "good: @good_lines"; print "bad : @bad_lines"; #### # untested snippet my @good_lines,@bad_lines; foreach my $file_name (@file){ open(MYFILE, $file_name) or die qq(Cannot open '$file_name' : $!\n); # Read file line by line my $line; while (defined $line = ) { # Does the current line match our RE? if ($line =~ /NOT|INVALID|MUST|ERROR/) { push @bad_lines, $line; # store it in @bad_lines } else { push @good_lines, $line; # store it in @good_lines }; }; }; print "good: @good_lines"; print "bad : @bad_lines"; #### open(MYFILE, $file[$i]) or die qq(Cannot open $file[$i] : $!\n); #### perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web