Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Can't use string "1" as a HASH ref while "strict refs" in use

by Juerd (Abbot)
on Mar 04, 2002 at 19:55 UTC ( [id://149194]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $switchnum = 15;
    my $calltype = []; # Empty array ref
    print "ref of switchnum = ref($switchnum) \n
           ref of calltype = ref($calltype) \n";
    
  2. or download this
    ref of switchnum = ref(15) 
    
           ref of calltype = ref(ARRAY(0x1234567))
    
  3. or download this
    ref(eval "\$$_") or warn "\$$_ is not a reference" for qw(switchnum ca
    +lltype);
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-20 01:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found