Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Climbing Mt. Perlcritic -- Switch statements

by Bloodnok (Vicar)
on Mar 25, 2009 at 17:50 UTC ( [id://753194]=note: print w/replies, xml ) Need Help??


in reply to Climbing Mt. Perlcritic -- Switch statements

I nearly didn't spot that the if condition
/filename\s*=\s*(\S+)/x
& the (supposedly) equivalent switch condition
/filename\s*=\s*(\S+)/
aren't the same - the if version has the x modifier.

A user level that continues to overstate my experience :-))

Replies are listed 'Best First'.
Re^2: Climbing Mt. Perlcritic -- Switch statements
by ikegami (Patriarch) on Mar 25, 2009 at 20:05 UTC
    Not supposedly. They are equivalent.
      ... but surely they're equivalent only because there's no extended RE at play ?

      A user level that continues to overstate my experience :-))

        Lots of things would make them not equivalent. What's your point?

        By the way, the "x" modifier has nothing to do with extended regexp features.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-26 04:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found