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

Re^2: Regular expressions and sort

by ioannis (Prior)
on Nov 04, 2005 at 15:16 UTC ( #505728=note: print w/replies, xml ) Need Help??


in reply to Re: Regular expressions and sort
in thread Regular expressions and sort

I was also eyeballing the statement $mask=/_(\d\d)_/ . After some investigation with use re 'debugcolor', it turns out that the /_(\d\d)_/ gets compiled but nothing is stored in $mask. In effect, the statement

$_[0] =~ /$mask/ is equal to $_[0] =~ //

Replies are listed 'Best First'.
Re^3: Regular expressions and sort
by ikegami (Pope) on Nov 04, 2005 at 15:43 UTC
    No, not "nothing". The result of $_ =~ /_(\d\d)_/, a boolean value, gets stored.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://505728]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2017-02-21 23:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (321 votes). Check out past polls.