in reply to Re^3: Statistics Data Structure Hash of Arrays, Arrays of Array
in thread Statistics Data Structure Hash of Arrays, Arrays of Array

quick question: what does

@t{@h} = @d;

do and what do you think it should do?

Replies are listed 'Best First'.
Re^5: Statistics Data Structure Hash of Arrays, Arrays of Array
by AnomalousMonk (Archbishop) on Nov 11, 2016 at 05:05 UTC

    What I think it should do (and what it does) is to assign a set of values in  @d to a set of keys  @h of the  %t hash (a slice of that hash).

    c:\@Work\Perl>perl -wMstrict -le "use Data::Dump qw(dd); ;; my @h = qw(uno dos tres); my @d = qw(one two three); ;; my %t; @t{@h} = @d; ;; dd \%t; " { dos => "two", tres => "three", uno => "one" }
    Please see Slices in perldata.


    Give a man a fish:  <%-{-{-{-<