Looks like a two stage process to me:
That's how I would do it, anyway.
Update: OP cross-posted at SO
In reply to Re: Parsing a text file in Perl.
by hippo
in thread Parsing a text file in Perl.
by ramki067
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |