Say I have an array of key/value pairs in PHP:
array( \'foo\' => \'bar\', \'baz\' => \'qux\' );
What\'s the simplest way to transform
chaos' answer is nice and straightfoward. For a more general sense though, you might have missed the array_map() function which is what you alluded to with your map { "$_=$hash{$_}" } keys %hash example.
array_map()
map { "$_=$hash{$_}" } keys %hash