in reply to adding elements to already exisiting elements in an array

Instead of storing your data in a flat array, store it in an array of arrays. To do that, replace your assignments with code like:

   push @{$Elements[$l]}, $anticipation;

That puts a reference to an anonymous array in $Elements[$l] which you add values to using push(). Then later you can access the values an index like:

   my @values = @{$Elements[$l]};

-sam