in reply to $ENV{PERL5SHELL}
in thread Security concern with sudo and system()

Yes, I have vague memories of long ago Perl using $ENV{SHELL} for system under Unix and that being fixed.

One of the reasons that building modules from CPAN doesn't work well under Win9x is that 2>&1 doesn't work in COMMAND. I realize now that the fix for this is IPC::Open2.

And now I've drifted way off the original topic. (:

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Avoiding Shell in favor of portable Perl code
by John M. Dlugosz (Monsignor) on Sep 16, 2001 at 09:02 UTC
    Re off topic: so change the topic.

    In the shell I use on Windows, command >& output redirects both stdout and stderr. I think something like what you show works too, but I'd have to look up the syntax details.

    Who needs a shell? Do it all in Perl, and run external programs when you need them but don't rely on the shell to do anything for you. Instead do the same stuff in Perl! Like you point out, redirect the output. Also, do globbing, directory listing, etc. all in Perl and then just call the program. That's a path I've taken, because COMMAND.COM isn't worthy of the name shell and using a real shell is non-portable.

    —John