Also for problems like this it can be very nice to open on pipes and hook them up within Perl.
In reply to Re (tilly) 1: shell problem by tilly in thread shell problem by Anonymous Monk