in reply to selecting values from hash via list

I'm confused. Your 2 printf statements print the same thing for me. Isn't that what you want -- to use a hash slice to save typing? See Slices.
printf "%-20s %5d %s\n", $h{name}, $h{age}, $h{zone}; printf "%-20s %5d %s\n", @h{qw/name age zone/};

Replies are listed 'Best First'.
Re^2: selecting values from hash via list (slice)
by leocharre (Priest) on Nov 06, 2009 at 22:23 UTC
    Oh.. dear... it works.. I thought I was making up code!

    I thought this was nonsense! : printf "%-20s %5d %s\n", @h{qw/name age zone/};