if ( exists $data{$key} ) { push @{ $data{$key} }, $value; } else { $data{$key} = [$value]; }