in reply to Re: sh to pl?
in thread sh to pl?

#!/usr/bin/perl use strict; use warnings; open (SH, '<', '/path/to/shell-script') or die "$!\n"; my $script = join("\n", <SH>); qx/$script/; close SH; exit $?;

--
જલધર

Replies are listed 'Best First'.
Re: simple converter :-)
by Louis_Wu (Chaplain) on Nov 22, 2002 at 05:21 UTC
    Hey, no cheating!

    Massyn, he's just piped your shell script to the shell. Sheesh.

    'Course, my assumption that you want the script rewritten in Perl may be incorrect. :)