oke, i found the problem.
the next code print a msg if word "eroare" is found:
#!/usr/bin/perl
use strict;
use warnings;
print "searching using regexp...\n";
my $a = "start";
open(my $in, "<", "DirectX.log") or die "Can't open DirectX.log: $!
+";
#print $a;
while (<$in>) { # assigns each line in turn to $_
#print "Just read in this line: $_";
$a = $a . $_;
}
if ($a =~ /eroare+/) {
print "found eroare\n";
}
close $in or die "$in: $!";
can anyone tell me how can i make it to print every occurance of the match?