On Wed, Dec 01, 2004 at 02:00:49PM +0100, Ing. Branislav Gerzo wrote: > Mat Harris [MH], on Wednesday, December 1, 2004 at 12:19 (+0000) > contributed this to our collective wisdom: > > >> Is there any special function for that job? > > MH> personally I would use a rexex: > MH> if ($myunknownvalue =~ m/^\d*$/) > > personally I would change this regex to: > if ($myunknownvalue =~ m/^\d+$/) > because regex given matches also empty set ('')
very true. noted. I always forget about the greedy factor > > -- > > ...m8s, cu l8r, Brano. > > ["I shall be delivered from this fetid and festering sewer."-Winchester] > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > -- Cats land on their feet. Toast lands jellyside down. A cat glued to some jelly toast will hover in quantum indecision perl -e'$_=q#: 13_2: 12/o{>: 8_4) (_4: 6/2^-2; 3;-2^\2: 5/7\_/\7:\ 1 m m::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print' Yes, of course it's the right cabl [le0: NO CARRIER]
pgpKAb6nXG5hF.pgp
Description: PGP signature