I am trying to figure out a way to initialize a hash without having to go through a loop. I was hoping to use slices for that, but it doesn\'t seem to produce the expected resul
%hash = ('current_symbol' => 'BLR', 'currency_name' => 'Real');
or
my %hash = (); my @fields = ('currency_symbol', 'currency_name'); my @array = ('BRL','Real'); @hash{@fields} = @array x @fields;