my %hash; 1 if $hash{t1}; 1 for $hash{t2}; \$hash{t3}; sub { }->( $hash{t4} ); sub { ++$_[0] }->( $hash{t5} ); print "$_\n" for sort keys %hash; #### t2 t3 t5 #### if ($hash{foo}{bar}) #### if ($hash{foo} && $hash{foo}{bar})
## t2 t3 t5 ##
## if ($hash{foo}{bar}) ##
## if ($hash{foo} && $hash{foo}{bar})