[ create a new paste ] login | about

Link: http://codepad.org/jkVlISdv    [ raw code | output | fork ]

Perl, pasted on Mar 18:
$line ='/usr/libexec/postfix/';

if ($line =~ m{^/usr/libexec/postfix}) {
     print "Match!\n";
} else {
     print "No match\n";
}

$line ='/usr/libexec/postfix/qmgr';

if ($line =~ m{^/usr/libexec/postfix}) {
     print "Match!\n";
} else {
     print "No match\n";
}


$line ='/usr/sbin/named';

if ($line =~ m{^/usr/libexec/postfix}) {
     print "Match!\n";
} else {
     print "No match\n";
}


Output:
1
2
3
Match!
Match!
No match


Create a new paste based on this one


Comments: