You seem to have been nearly there with your solution. Just create an array (!!) with 'my @outarray;', change any 'print OUT' to 'push @outarray,' and at the exit point of your script add 'print LOG @outarray;'.
Or use BrowserUk's suggestion, which works as well
In reply to Re: Changing the order of printing
by jethro
in thread Changing the order of printing
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |