in reply to Re: (jeffa) Re: (USING POE!) Re: 'better mousetrap': how to perform timed event
in thread 'better mousetrap': how to perform timed event

Heh heh ... thwack away! ;)

"... is it simply an issue of pre-emptive maintenance coding headache prevention?"

I think so. What if you suddenly decide that the string you need to match needs to be dynamic? You forget to remove the o modifer and possibly spend a lot of time trying to find the bug when your regex stops matching. Here is some code to demonstrate:
@data = qw(foo bar baz qux); { print "search: "; chomp ($in = <STDIN>); last unless $in; print $_,$/ for grep /\Q$in\E/o, @data; redo; }
I figure why bother with such premature optimizations if they have the potential to bite.


(the triplet paradiddle with high-hat)