http://www.perlmonks.org?node_id=907767


in reply to How do I take a slice of a hash reference?

japhy has answered the question, but it's also worth pointing out the solution to the syntax error in your original code. The parentheses alter the priority; so just remove them:
print join ':', @$hash{1,2};
More generally, put curly braces around the hash ref expression:
print join ':', @{$hash}{1,2};