in reply to A hash question

my @loadavg = (0.00, 0.73, 2.86, 1/102, 32469); my %load; @load{qw(ONE FIVE FIFTEEN)} = @loadavg;

Replies are listed 'Best First'.
Re^2: A hash question
by arkturuz (Curate) on Dec 19, 2005 at 14:59 UTC
    Hm, why didn't I came with that? I am becoming slow... Too much alcohol :-)

    Thnx, perl being :-)

    BTW, shouldn't the last line be like:

    @load{qw(ONE FIVE FIFTEEN)} = (@loadavg[0,1,2]);
      Both ways are valid. The assignment operator silently ignores the extra values.
        Hm, cool. Thanks for help!

        Cheers!