in reply to Re^3: Cannot find the error
in thread Cannot find the error

I fixed it with, for some reason it went to this section after matching t the second time and cleared the array.
} $backin = shift(@section); undef(@section); push(@section,$backin); } } close ($fh); exit;

Replies are listed 'Best First'.
Re^5: Cannot find the error
by choroba (Cardinal) on Apr 03, 2020 at 14:38 UTC
    I'm not sure how it solves you problem, but a shorter way to write the same is
    @section = shift @section;
    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]