in reply to Proper way to initialize local variables

Your array is empty. local @recarray; is enough. Maybe your sub is better done this way:
sub any { my @recArray; local $_; ... while ( defined ($_ = <$fh> ) ) { push @recArray, $_; ... } }
but that is just a guess.
Boris