Help for this page
my @keys_to_process = $x eq 'key_1' ? keys %my_hash : exists $my_hash{$x} ? ($x) ... foreach $key (@keys_to_process) { do_something_with($key); }
my @keys_to_process = ! exists $my_hash{$x} ? () : $x eq 'key_1' ? keys %my_hash : ($x) ;