P is for Practical | |
PerlMonks |
Re: Regex questionby thelenm (Vicar) |
on Mar 19, 2004 at 22:07 UTC ( [id://338191]=note: print w/replies, xml ) | Need Help?? |
What I would do is set the default value first, then try the match. Something like this:
Or the ternary ?: operator, like this:
-- Mike --
In Section
Seekers of Perl Wisdom
|
|