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.