I want to search a regex in perl without replacing it and without going line by line to search it
Any help will be apriciable
Thanks in advance
Any help will be apriciable
Thanks in advance
open FH,"log"; while (my $line = <FH>){ if( $line =~ m/regexp/ ) { "Found regexp in $line\n"; last; $stops searching after first match } } close FH;
open FH,"log"; while (my $line = <FH>){ if( $line =~ m/regexp/ ) { "Found regexp in $line\n"; last; $stops searching after first match } } close FH;
$stops Searching
Comment