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


in reply to 1 loop too many in array iteration

Square brackets [] return a reference to an array — i.e., a single scalar value. So the line:

my @done = ["$time[5]-$time[4]-$time[3]", $type, $amount];

assigns an array reference to the first element only ($done[0]) of @done. I think you wanted:

my @done = ("$time[5]-$time[4]-$time[3]", $type, $amount);

which populates the array @done with three scalar values.

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,