in reply to Re: cgi input
in thread cgi input

The order of the hash is irrelevant. You end up with a list of keys, and you use that to get the values (see my answer below), the order of either keys or values doesn't make any difference.

Replies are listed 'Best First'.
3Re: cgi input
by jeffa (Bishop) on Nov 04, 2003 at 19:09 UTC
    In your case the order is irrelevent, but isn't it nice to know that keys and values will be "synchronized" none the less? :)
    my %hash = qw(foo bar baz qux one two three four); my @key = keys %hash; my @val = values %hash; print "$key[$_] => $val[$_]\n" for 0..$#key;

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)