Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Regex error when [] occurs in file..

by Joost (Canon)
on Mar 03, 2008 at 16:11 UTC ( [id://671672]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Regex error when [] occurs in file..
in thread Regex error when [] occurs in file..

Are all 'special variables' ($&, $N (N is integer)) expanded in that way too?
All variables are expanded that way, special or not:
my $var = '[ab]'; my $string = '12a3434'; print "match" if $string =~ /$var/;
See also quotemeta and the \Q and \E escape sequences.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2025-01-17 04:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (55 votes). Check out past polls.