K
Kenneth Brun Nielsen
I need to perform a conditional on a regexp match. How can I do that
(easily) in PERL.
The following prints out all lines - also the ones, that doesnt match
the regular expression.
#!/usr/bin/perl -w
open FILEHANDLE, "soatest.soa";
while (<FILEHANDLE>){
if (/^\*| XI/) {
print "match in line: $.\n";
}
}
(easily) in PERL.
The following prints out all lines - also the ones, that doesnt match
the regular expression.
#!/usr/bin/perl -w
open FILEHANDLE, "soatest.soa";
while (<FILEHANDLE>){
if (/^\*| XI/) {
print "match in line: $.\n";
}
}