Have a look at ref
my ( $scalar, @array ); foo( \$scalar ); foo( \@array ); sub foo { print ref $_[0], "\n"; } __END__ SCALAR ARRAY
In reply to Re: Determining the type of a subroutine parameter
by FunkyMonk
in thread Determining the type of a subroutine parameter
by esr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |