Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

adamsj's scratchpad

by adamsj (Hermit)
on Jun 02, 2004 at 04:49 UTC ( #359161=scratchpad: print w/ replies, xml ) Need Help??

Here's the gist of it:
foreach my $file (readdir(DIR)) { next unless ($file =~ m/^mail\.log/); open(IN, "<$file") or die "Couldn't open $file: $!"; my $count; foreach my $line (<IN>) { $count++; if ($line =~ m/$pattern/) { print REPORT "File\t$file contains\t$1 on line\t$count!\n" +; print LINES $line; } } close(IN); }
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2013-05-25 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (516 votes), past polls