Hippo! Thank you so much for that link on deep-copy mechanics. That's exactly what I needed :)
Fixed code
#!/usr/bin/perl
use strict;
my $Action;
my $piece;
$piece->{this} = 123;
$piece->{that} = 'some text';
foreach my $other (111...113){
my $thispiece = {%$piece}; # create a deep copy
$thispiece->{theother} = $other;
push(@{$Action}, $thispiece);
}
use Data::Dumper;
print Dumper($Action);
And now the output looks like I expected it to:
$VAR1 = [
{
'that' => 'some text',
'theother' => 111,
'this' => 123
},
{
'theother' => 112,
'that' => 'some text',
'this' => 123
},
{
'this' => 123,
'theother' => 113,
'that' => 'some text'
}
];
Hippo FTW!