Archive

Archive for the ‘Perl’ Category

Perl test program for pattern matching for programmer

March 27, 2012 Leave a comment

#!/usr/bin/perl
while () {
chomp;
if (/YOUR_PATTERN_GOES_HERE/) {
print “Matched: |$`$’|\n”; # Mystery code!
} else {
print “No match.\n”;
}
}

Advertisements
Categories: Linux, Perl