in reply to Re-write shell in perl

I'd say that objection 2 is more obviously resolved using either IPC::Open3 or IPC::Run3. The other two arguments remain, unless of course there is no Perl equivalent, so e.g. the unix command
comm [-123] file1 file2
if used repeatedly should be replaced with a handrolled Perl equivalent to prevent process creation overheads, or else provided your expectations are Unix only and non-repeating you could still allow the odd shelling out with IPC.
__________________________________________________________________________________

^M Free your mind!