Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Distiguishing arguments: number-strings vs real integer

by Tux (Abbot)
on Aug 10, 2018 at 12:55 UTC ( #1220192=note: print w/replies, xml ) Need Help??


in reply to Distiguishing arguments: number-strings vs real integer

You can use Data::Peek's DDual:

$ perl -MDP -wE'sub foo{DDumper[DDual($_[0])]};foo(42);foo("42");' [ undef, 42, undef, undef, 0 ] [ 42, undef, undef, undef, 0 ] $ perl -MDP -wE'sub foo{DDual($_[0]);1;};foo(42);foo("42");' IV(42) PV: SV_UNDEF IV: IV(42) NV: SV_UNDEF RV: SV_UNDEF PV("42"\0) PV: PV("42"\0) IV: SV_UNDEF NV: SV_UNDEF RV: SV_UNDEF
my ($pv, $iv, $nv, $rv, $hm) = DDual ($var [, $getmagic])

Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2020-04-04 00:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (32 votes). Check out past polls.

    Notices?