in reply to Re: How to convert a shell script to Perl?
in thread How to convert a shell script to Perl?

I hope the users are not using funny passwords as for instance ";rm -Rf /;"!!!

Instead of the backquote operator it is safer to use system @array to call external programs:

system ('wget', "--http-user=$username", "--http-password=$password", "--no-check-certificate", "--output-document=$path", $url);
That way special characters are not expanded and/or interpreted by the shell in unexpected ways.

Replies are listed 'Best First'.
Re^3: How to convert a shell script to Perl?
by stevieb (Canon) on Jun 30, 2010 at 13:36 UTC

    Thanks for the tip

    I haven't had the need for system or backticks in a very long time, so that's a good reminder. Besides, the OP needs to do *some* of the work ;)

    Steve