in reply to Elegant way to parse an optional prefix with default?
You've hit a non-DWIMism. $@ is getting expanded into the value of that scalar. If you escape the $ then you can do: my( $sigil )= ( $name =~ /^([\$@%&<*])/, '&' );
- tye (just ignore this answer to the wrong question)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (tye)Re: Elegant way to parse an optional prefix with default?
by John M. Dlugosz (Monsignor) on Nov 08, 2002 at 17:04 UTC | |
by tye (Sage) on Nov 08, 2002 at 17:31 UTC |