The best thing would be to set $/ to some kind of record separator such that your my @unclean = <LST> actually sucks in one record per array entry rather than one line ($/ is the input record separator, usually "\n", so <LST> reads in a line at a time). However, without more information it's difficult to tell what a good value would be.
It looks as if every record is separated by a line consisting of "N/A N/A\n"; if that's true, then try setting $/ = "N/A N/A\n" ("\nN/A N/A\n" might be safer — matches a line containing exactly N/A N/A, not simply ending in N/A N/A) and taking a look at what you get in @unclean (more info in perlvar docs). If that works then you might also want to investigate using /s and/or /m as modifiers on your regexp (these modify how regexps process newlines - more info in perlop docs).
HTH…
In reply to Re: Capturing Multiple lined data with regex.
by conrad
in thread Capturing Multiple lined data with regex.
by blackadder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |