I'm looking to have a one liner version of this:
my $xid = ''; $xid = param('xid') if param('xid') =~ m/^\d+$/;
Basically, if the param is numeric then assign it to $xid, other wise '' (IE empty but declared) Some thing like:
my $xid = param('xid') if param('xid') =~ m/^\d+$/ || '';
But I know that that is not right, what am I missing?
I could do the ? : ; dance but I'm not sure 'my' would stay in the scope I need it in.
TIA
Lee.M - JupiterHost.Net
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>