in reply to Determining the type of a subroutine parameter

I don't think that quite answers the OP i.e. from the POV of a scalar variable - to use the given example ...

sub foo { print "Type: ", ref $_[0], "\n"; } my ( $scalar, @array ); foo( $scalar ); foo( \$scalar ); foo( \@array ); __END__ Type: Type: SCALAR Type: ARRAY
This to determine if a scalar has been passed, calling ref on it will return the empty string.

HTH ,

A user level that continues to overstate my experience :-))