in reply to Embedding perl in bash

Backtics are considered 'old school'. Here is an option using perl %ENV:
export INP2="A String of Text" RES=$(perl -e '($x=$ENV{INP2})=~s/String/Wall/;print $x') echo $RES A Wall of Text

        The best defense against logic is ignorance.

Replies are listed 'Best First'.
Re^2: Embedding perl in bash
by stevieb (Canon) on Oct 22, 2015 at 23:10 UTC
    Is the use of the outer parens creating a form an inline shell function here?