"Jupiterhost.Net" wrote:
> 
> John W. Krahn wrote:
> >
> > This will work if param('xid') returns anything but undef:
> >
> > my ( $xid ) = param( 'xid' ) =~ /(^\d+$|)/;
> 
> I like that, good idea. It is possible it may be undef though, doh!

If it is and you have warnings enabled (you DO have warnings enabled
don't you?) then you will get the warning:

Use of uninitialized value in pattern match (m//)

But you would get that no matter which solution you used.


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to