in reply to Re: Switching from backticks to open
in thread Switching from backticks to open

Using Text::ParseWords will introduce some incompatibilities.

Update: Added last item.

Replies are listed 'Best First'.
Re^3: Switching from backticks to open
by repellent (Priest) on Nov 03, 2008 at 17:51 UTC
    Yes, with Text::ParseWords, we'll lose all "shell-magic" interpretation. That means no $SHELL_VARIABLE expansion, globs/redirection/pipe operators are treated as plain arguments, etc.

    shellwords($text) is merely parsing $text into words as-is. Care should be taken to manually expand globs or $SHELL_VARIABLES embedded in the literal $text. Caution: Beyond the very simple case, it is best to avoid going down the path of recreating shell behavior using shellwords().