- or download this
perl -E "$str = 'Hi World!'; $sub = \substr $str, 0, 2; $$sub = 'Hello
+'; say $str; say ref $sub"
Hello World!
LVALUE
- or download this
use feature 'say';
use Data::Dump qw( pp );
use Storable qw/ freeze thaw /;
...
$a->[1] = \$a->[0];
$a;
}
- or download this
my $struct = ["Hi perlmonks"];
push @$struct, \substr($struct->[0], 0, 2);
my $storable = thaw freeze $struct;
...
Hello perlmonks
Hi perlmonks
Hi perlmonks