%hash = ( foo => { this => '...', that => '...', here => '...', there => '...' }, bar => { this => '...', that => '...', here => '...', there => '...' } ); #### for (sort { $hash{$a}->{this} <=> $hash{$b}->{this} } keys %hash)