Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^5: ref == "REF"

by Anonymous Monk
on Oct 18, 2004 at 21:15 UTC ( [id://400324]=note: print w/replies, xml ) Need Help??


in reply to Re^4: ref == "REF"
in thread ref == "REF"

Thinking about it some more made me realize that ref $x eq 'REF' can be used more efficiently then ref $x eq 'SCALAR'. (Although not really on the previous code, since the goal was to keep one reference at the end)

If you have ref $x eq 'REF' then you know that the scalar to which $x refers to is yet another reference, so noone stops you from doing $x = $$$x;, which avoids yet another call to the ref function...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-19 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found