Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Answer: How do I escape '#' pound sign?

( #59939=categorized answer: print w/ replies, xml ) Need Help??

Q&A > regular expressions > How do I escape '#' pound sign? contributed by ariels

Inside a regular expression (given the section we're in):
$x = '# a comment'; print "$&\n" if $x =~ m/^\#.* # A comment! /x;
(You have to backwhack the #, or m//x will consider it a comment.

Comment on Answer: How do I escape '#' pound sign?
Download Code
Log In?

What's my password?
Create A New User
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2016-02-13 15:54 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (438 votes), past polls