Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

regex matches when it seems that it shouldn't

by Lotus1 (Vicar)
on Apr 21, 2021 at 18:46 UTC ( #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? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2021-11-29 00:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?