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