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
use strict;
use warnings; # Must-haves
# ... Initialize your arrays
my @fields = ('currency_symbol', 'currency_name');
my @array = ('BRL','Real');
# ... Assign to your hash
my %hash;
@hash{@fields} = @array;