Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 browsing the Monastery: (10)
As of 2014-07-22 12:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (112 votes), past polls