#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my @array = ( { test => 1, test2 => 3},{ test => 1, test2 => 3}, { test => 1, test2 => 3},{ test => 1, test2 => 3} ); print Dumper \@array; x(\@array); print Dumper \@array; sub x{ my $p = shift; for my $i ( 0..3 ){ $p->[$i]->{test2} = 'etwas anderes'; } }