in reply to UN*X ls, sed, cat... in Perl
You won't be surprised to discover that someone already did (much of) this: ExtUtils::Command. Even if you don't want to make your code depend on ExtUtils::Command, you can crib from its source.
the lowliest monk
In Section
Cool Uses for Perl