'Course, that doesn't work when 'a' contains parentheses.
About this quote
- What does it mean?
- Wall points out that a solution fails when the variable contains parentheses.
- In plain terms
- The method breaks if the input has parentheses.
- What can you take from it?
- Check for special characters that may break parsing.
Where it applies
Putting it to work
Questions to consider
- What other characters could cause similar issues?
Another view
Only mentions one specific failure mode.
More from Larry Wall
That gets us out of deciding how to spell Reg[eE]xp?|RE . . . Of course, then we have to decide what ref $re returns... :-)
Permalink to quote #145 I was trying not to mention backtracking. Which, of course, means that yours is 'righter' than mine, in a theoretical sense.
Permalink to quote #147 That should probably be written: no !@#$%^&*:@!semicolon
Permalink to quote #144
Related quotes
There are probably better ways to do that, but it would make the parser more complex. I do, occasionally, struggle feebly against complexity... :-)
Larry WallLarry Wall quote #23 /* This bit of chicanery makes a unary function followed by a parenthesis into a function with one argument, highest precedence. */
Larry WallLarry Wall quote #264 A lot of times black folks look for love in all the wrong places. You're always looking for somebody to love you, be accepted, and there's the insecurities tha…
Chuck DChuck D quote #1