Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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";


Comment on Re^5: About a piece of code
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-12-29 11:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (187 votes), past polls