http://www.perlmonks.org?node_id=1039330


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