my $ref = \"stuff"; #### $$ref =~ s/u/i/; ## or even $$ref .= " and more stuff"; #### sub modify_string{ my $arg = \shift; ## $$arg is modified, no need for the details, eg $$arg =~ s/u/i/; return $$arg; } #### my $string = "stuff"; modify_string( $string ); ## or even my $copy = modify_string( $string ); #### my $new_string = modify_string ( "literal stuff" );