http://www.perlmonks.org?node_id=992878


in reply to Re^3: What is $x{$y}?
in thread What is $x{$y}?

How about $x{@y} then? How does that work?

For instance, in a foreach $x(@y){} line of code.

Replies are listed 'Best First'.
Re^5: What is $x{$y}?
by AnomalousMonk (Archbishop) on Sep 11, 2012 at 00:30 UTC
    How about $x{@y} then? How does that work ... in a foreach $x(@y){} line of code.

    There is no  $x{@y} expression in the
        foreach $x(@y){}
    statement. In that statement,  $x is aliased to successive elements of the  @y array on each execution of the loop.