Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Determining the type of a subroutine parameter

by FunkyMonk (Chancellor)
on Aug 18, 2008 at 14:51 UTC ( [id://704947]=note: print w/replies, xml ) Need Help??


in reply to Determining the type of a subroutine parameter

Have a look at ref
my ( $scalar, @array ); foo( \$scalar ); foo( \@array ); sub foo { print ref $_[0], "\n"; } __END__ SCALAR ARRAY


Unless I state otherwise, all my code runs with strict and warnings

Log In?
Username:
Password:

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

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

    No recent polls found