sub alist_get { my $k = shift; for (@_) { return $_ if $_->[0] eq $k } die "No such key in alist: $k" } push @{alist_get('two', @arr)->[1]}, 222;