Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

muba

by muba (Priest)
on Mar 03, 2004 at 09:25 UTC ( #333489=user: print w/ replies, xml ) Need Help??

My nodes that made it to the front page

 

Ways to find out if $scalar is numeric

tye and me having a little fun in the chatterbox.

[muba]: my $is_string = ($scalar ^ $scalar) eq ("$scalar" ^ "$scalar");
[tye]: my $isNumber = $scalar ^ '00' eq $scalar;
[tye]: my $isNumber = do { my $warn= 0; local $SIG{__WARN__}= sub { $warn= 1 }; use warnings; $scalar^=''; $warn };
tye]: my $isNumber = ( $scalar ^ "$scalar" ) =~ /\d/;

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2015-07-04 08:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (58 votes), past polls