Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^5: About a piece of code

by jwkrahn (Monsignor)
on Aug 05, 2009 at 19:10 UTC ( #786199=note: print w/replies, xml ) Need Help??

in reply to Re^4: About a piece of code
in thread About a piece of code

\s is not a single character in a regular expression, it is the character class [ \t\n\r\f].   See perlre.

$ perl -le' use Data::Dumper; $Data::Dumper::Useqq = 1; print Dumper grep /\s/, map chr, 0 .. 255; ' $VAR1 = "\t"; $VAR2 = "\n"; $VAR3 = "\f"; $VAR4 = "\r"; $VAR5 = " ";

In a double quoted string it is just the character "s".

$ perl -le' use Data::Dumper; $Data::Dumper::Useqq = 1; print Dumper "\s"; ' $VAR1 = "s";

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2016-10-25 03:25 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (313 votes). Check out past polls.