in reply to iterating returned hashes

The syntax %{ ... } is expecting a hash ref, but you're handing it a list. You'll need to enclose your list in (another) set of curly brackets to get it to do what you want:
# anon hash bracket \ # | # grouping bracket \ | # | | # V V print "$_\n" for keys %{ { returnlist() } }; sub returnlist { 1..10 }

-Blake