#!/usr/bin/perl use warnings; my $h = { b1 => 3, c1 => 7 }; my @slice = @$h{b1,c1}; print "Slice: @slice\n";