Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: String/Numeric Manipulation

by mifflin (Curate)
on Oct 07, 2004 at 17:02 UTC ( #397369=note: print w/replies, xml ) Need Help??


in reply to String/Numeric Manipulation

You could trap warnings for not numerics
use warnings; my $days = 'oops'; eval { local $SIG{__WARN__} = sub { die "not numeric" }; $days += 0; }; if ($@) { # at this point $days will be zero # and $@ will be "not numeric" }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://397369]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2022-01-27 03:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (70 votes). Check out past polls.

    Notices?