Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Detecting if a scalar has a number or string

by ysth (Canon)
on Nov 18, 2004 at 21:15 UTC ( [id://408889]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $a = 'string';
    if (defined ($a <=> $a)) { print "Oops"; }
    
  2. or download this
    my $Inf = 9**9**9;
    my $NaN = sin($Inf);
    print "inf is: $Inf\n", "NaN is: $NaN\n";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 12:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found