FreeKB - Perl (Scripting) Regular expression delimiter
Perl (Scripting) - Regular expression delimiter

By default, the forward slash character is used to separate fields in regular expressions in Perl.

if ($foo =~ /hello/) { print "foo contains hello"; }


Using the m character, you can use a different character to separate fields in a regular expression. In this example, m is used and # is set as the delimiter.

if ($foo =~ m#hello#) { print "foo contains hello"; }


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 6c26b in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |