in reply to un-Nifty qr OR ASCII bullet parser
Safer (allows "-", for example):
Alternative (shorter and returns a compiled regexp unlike the OP's and the above solutions):my $bullet = sprintf qr/[%s]/, quotemeta join '', keys %bullets;
my ($bullet) = map qr/[\Q$_\E]/, join '', keys %bullets;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Nifty qr OR bullets with butterfly wings
by belg4mit (Prior) on Aug 13, 2009 at 20:00 UTC | |
by ikegami (Patriarch) on Aug 14, 2009 at 02:59 UTC | |
by belg4mit (Prior) on Aug 14, 2009 at 03:37 UTC |
In Section
Cool Uses for Perl