Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Return value from a binding operator?

by dsheroh (Parson)
on Apr 13, 2013 at 09:50 UTC ( #1028499=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Return value from a binding operator?
in thread Return value from a binding operator?

The ^ metacharacter has different meanings in different parts of a regex.

Normally, it does mean "start of line", as you thought. If the regex were m!^/!, then it would match lines beginning with /.

However, as the first character in a character class, it negates the class, so [^/] means "match any character except /". (But, again, that's only if it's the first character in the class - [/^] means "match either a / or a ^". And [^/^] would match any character except those two.)


Comment on Re^3: Return value from a binding operator?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1028499]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (13)
As of 2015-07-02 18:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (44 votes), past polls