in reply to Re^2: Script Help
in thread Script Help

Again assuming you are processing a static file, I would tend to attack the problem this way: