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

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 :)
try

#!/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: $!";

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1039330]
help
Chatterbox?
[Discipulus]: thanks marto but... at the moment this seems a bit beyond my faculties.. ;=)
[zentara]: a thread goes into a wait state after emitting a wait to all other threads. It locks up a machine completely.
[marto]: if you mean the recent hyperthreading bug, I don't think that's NSA related?
[zentara]: s/thread/cpu/
[marto]: xkcd://538
[Discipulus]: these opcodes mentioned in the wiki pages are the same opcode perl is translated into? or is just the same term but in different fields?
[zentara]: it's useful if you want to lockup a multicore machine :-)
[zentara]: marto I would give up the key easy with drugs....
[Corion]: Discipulus: No, the Perl opcodes are more high-level than the raw processor opcodes
[zentara]: sodium pentathol and a beautiful woman interogator :-)

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2017-07-28 12:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (428 votes). Check out past polls.