11.27. Options and modifiers

//    is actually the same as    m//
When using the m sign you can change the delimiters:
Let's say you would like to match lines with

/usr/bin/perl

if ($line =~ /\/usr\/bin\/perl/) {
}

if ($line =~ m{/usr/bin/perl}) {
}  

If you are interested in on-site trainings by the author, please contact me directly.

Online courses:

Would you like to get
updated when I publish
the next article?

Follow me:

Google Plus Twitter RSS feed