I'm using the Perl push on an array, but every time I push something on the array, it also pushes the item's index as well.
I am doing the same action on 2 arrays at the same time, and one pushes as expected, but the other does not.
What could be causing this unexplained behavior?
if ($var->{color} == 1) {
push @x, $var->{variable}.'-l';
push @y, $var->{variable}.'-p';
}
else {
push @x, '__',
push @y, '__',
}
y has the data as expected, but x does not.