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