in reply to Re: a word of warning about /$pattern/
in thread a word of warning about /$pattern/
This kind of thing keeps me humble, because I know that somewhere there is someone who understands exactly why this was a good idea
Its still a good idea:
if (/foo/ or /bop/ or /fnorble/) { s//baz/; }
IOW, it means you can have several regexes try to match, and then without having to worry about which one did you can then replace the thing that was matched. I only recently came accross this feature, but sice I have its found its way into more code than I thought it would.
First they ignore you, then they laugh at you, then they fight you, then you win.
-- Gandhi
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: a word of warning about /$pattern/
by Aristotle (Chancellor) on Dec 07, 2003 at 09:43 UTC | |
by demerphq (Chancellor) on Dec 07, 2003 at 18:06 UTC | |
by Aristotle (Chancellor) on Dec 08, 2003 at 06:20 UTC |