I've just had to use a hash slice for the first time ever...how exciting.
my %slice;
@slice{@fields} = map { [ 'some', 'stuff' ] } @fields;
It's pretty cool and helpful....strange it's taken me so long to actually use one.
Code:
my @fields = $IN->param('fields'); my %slice;
@slice{@fields} = map { [ 'some', 'stuff' ] } @fields;
It's pretty cool and helpful....strange it's taken me so long to actually use one.