#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my $hash = { base => { key => 'value', key2 => 'value2'}}; print Dumper $hash; my @output = grep $hash, 'value2'; print "@output\n";