in reply to Re^2: pull single value
in thread pull single value

Then go back to using push @array, $record;, like you did in the OP.

Maybe you should address the warning before you do anything else.