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" }
In reply to Re: String/Numeric Manipulation
by mifflin
in thread String/Numeric Manipulation
by Ms. T.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |