I do not understand what you mean. Your code is not valid Perl.
>type tryit.pl
use strict;
use warnings;
my $add_in = ();
my @$add_in = $add_ins[0];
>perl tryit.pl
"my" variable $add_in masks earlier declaration in same scope at tryit
+.pl line 4
.
Can't declare array dereference in "my" at tryit.pl line 4, near "$add
+_in ="
Global symbol "@add_ins" requires explicit package name (did you forge
+t to decla
re "my @add_ins"?) at tryit.pl line 4.
Execution of tryit.pl aborted due to compilation errors.
I defined the array @add_ins to force grep to run in list context. Execution of grep returnes a list (which contained only one element) and assigned it to @add_ins. The statement my $add_in = $add_ins[0]; assigns the value of that element to the scalar $add_in. Note that the value is a reference to the hash which contains the data which is to be added to every hash. AnomolousMonk accomplished the same thing by using the extra parenthesis to force list context and used list assignment to extract the single reference.