- or download this
my $ref = \"stuff";
- or download this
$$ref =~ s/u/i/;
## or even
$$ref .= " and more stuff";
- or download this
sub modify_string{
my $arg = \shift;
...
$$arg =~ s/u/i/;
return $$arg;
}
- or download this
my $string = "stuff";
modify_string( $string );
## or even
my $copy = modify_string( $string );
- or download this
my $new_string = modify_string ( "literal stuff" );