Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: How do you identify a reference?

by dsb (Chaplain)
on May 09, 2002 at 17:38 UTC ( [id://165442]=note: print w/replies, xml ) Need Help??


in reply to How do you identify a reference?

use strict; my $var = "whatever"; # try different values to see what happens my $val = ref $var; my $res = $val ? "Is a Refenence: $val" : "Not a reference"; print $res, "\n";
ref will return the type of reference(SCALAR,ARRAY,HASH,etc).




Amel
This is my cool %SIG

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2024-04-23 18:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found