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

Re: detecting of scalar is string or numeric

by clueless newbie (Deacon)
on Feb 09, 2017 at 16:03 UTC ( #1181539=note: print w/replies, xml ) Need Help??


in reply to detecting of scalar is string or numeric

From an earlier post: Thanks to Autobox you can do
use autobox::universal qw(type); say type("42"); # STRING say type(42); # INTEGER say type(42.0); # FLOAT say type(undef); # UNDEF
See chocolateboy's response in "How to tell apart numeric scalars and string scalars in Perl?"

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2019-11-20 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (103 votes). Check out past polls.

    Notices?