my %hashA = ( this => 'A', that => 'B', other => 'C' ); my %hashB = ( A => 'aye', B => 'bee', C => 'see' ); { local $" = "\n"; print "@hashB{ values( %hashA ) }\n"; }