Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^2: log parser

by ultibuzz (Monk)
on Jun 17, 2013 at 10:50 UTC ( #1039330=note: print w/ replies, xml ) Need Help??

in reply to Re: log parser
in thread log parser

you do a regex on your filehandler and not it content :)

#!/usr/bin/perl use strict; use warnings; print "searching using regexp..."; open(my $in, "<", "DirectX.log") or die "Can't open DirectX.log: $! +"; while (<$in>) { # assigns each line in turn to $_ print "Just read in this line: $_"; if ($_ =~ /eroare/) { print "found eroare on line nr: $.\n"; } } close $in or die "$in: $!";

Comment on Re^2: log parser
Download Code
Replies are listed 'Best First'.
Re^3: log parser
by alex_fatu (Novice) on Jun 17, 2013 at 10:53 UTC
    thank you!!!!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1039330]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2016-02-08 14:43 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (276 votes), past polls