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

Re^3: Regex in if statement

by hippo (Abbot)
on Mar 18, 2014 at 19:57 UTC ( #1078857=note: print w/replies, xml ) Need Help??


in reply to Re^2: Regex in if statement
in thread Regex in if statemetn

Sure they do:

$ cat 1078855.pl use warnings; use strict; while (<DATA>) { print if /^#\s*[a-z]+/i; } __DATA__ #MO # MO #mo # mo # 555 $ perl 1078855.pl #MO # MO #mo # mo $

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1078857]
help
Chatterbox?
[shmem]: use parens to group expressions
[shmem]: you can't use next in a statement modifier
[shmem]: next requires a BLOCK
[shmem]: same with redo. See also goto hell (shameless plug)

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2018-05-20 18:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?