in reply to Elegant way to parse an optional prefix with default?
Actually, that doesn't work. You don't have a $1 there. If you added the parens to make it work, I still don't quite see how to get it into one line. Nor would I worry about that.$name =~ s/^[$@%&<*]//; my $sigil= $1 || '&';
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Elegant way to parse an optional prefix with default?
by John M. Dlugosz (Monsignor) on Nov 08, 2002 at 05:32 UTC |