Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Dualvars besides $!

by Tux (Monsignor)
on Jan 28, 2014 at 11:27 UTC ( #1072340=note: print w/ replies, xml ) Need Help??


in reply to Re: Dualvars besides $!
in thread Dualvars besides $!

It is possible (in XS) to put anything in the specific slots:

$ perl -MData::Peek -wC3 \
       -E'my $tv = Data::Peek::triplevar ("\N{GREEK SMALL LETTER PI}", 3, 3.1415);' \
       -e'say for map { $_ // "<undef>" } DDual ($tv)'
π
3
3.1415
<undef>
0

Data::Peek's DDual will return all of those: my ($pv, $iv, $nv, $rv, $hm) = DDual ($var [, $getmagic])


Enjoy, Have FUN! H.Merijn


Comment on Re^2: Dualvars besides $!
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2014-09-17 05:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (58 votes), past polls