Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

regex matches when it seems that it shouldn't

by Lotus1 (Vicar)
on Apr 21, 2021 at 18:46 UTC ( [id://11131541]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    print "  - contains whitespace 2\n" if m/^\s+$/;
    
  2. or download this
    >perl -MO=Deparse test.pl
    
    ...
    print "  - contains whitespace 2\n" if /^\s+$/;
    07_test.pl syntax OK
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-24 18:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found