sub function { my ($arref,$value) = @_; push @{$arref}, $value; } my @array; function( \@array, 'neuer wert' ); print $_,"\n" for @array;