use Devel::Peek qw( Dump ); sub f { my $x = shift; # Scalar is copied. Dump( $x ); # ... } my $x = "abc"; Dump( $x ); f( $x ); # Only a "C pointer" copied onto the stack.