"John W. Krahn" wrote:
>
> "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
"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 war
John W. Krahn wrote:
"Jupiterhost.Net" wrote:
Howdy,
Hello,
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 $xi
"Jupiterhost.Net" wrote:
>
> Howdy,
Hello,
> 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 $xi
Paul Johnson wrote:
On Sat, Mar 20, 2004 at 03:10:18PM -0600, JupiterHost.Net wrote:
Howdy,
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 d
James Edward Gray II wrote:
On Mar 20, 2004, at 3:10 PM, JupiterHost.Net wrote:
Howdy,
I'm looking to have a one liner version of this:
Why? Do you win a cookie if you do it in one line? ;)
Not so much a cookie as some sugar :)
I win cookies at work for writing clear code, which often inv
On Sat, Mar 20, 2004 at 03:10:18PM -0600, JupiterHost.Net wrote:
> Howdy,
>
> 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 declar
On Mar 20, 2004, at 3:10 PM, JupiterHost.Net wrote:
Howdy,
I'm looking to have a one liner version of this:
Why? Do you win a cookie if you do it in one line? ;)
I win cookies at work for writing clear code, which often involves more
than one line.
my $xid = '';
$xid = param('xid') if param(