title: replacing a word with a sentence in perl script
body: <p>Is there a way we can replace a word with a complete sentence in perl</p>
  
  <p>I know there is a option </p>
  
  <pre><code>perl -pi-back -e 's/ACTUAL_WORD/EXPECTED_WORD/g;' inputfile.txt
  </code></pre>
  
  <p>This replaces only word to a word. My requirement is to replace below mentioned ACTUAL_WORD with EXPECTED_SENTENCE.</p>
  
  <pre><code>ACTUAL_WORD: test
  EXPECTED_SENTENCE: this if for sandbox
  </code></pre>
  
  <p>UPDATED ISSUE
  I am trying to replace the word with Sentence with in a perl script</p>
  
  <p>system("perl -pi-back -e 's/\$SHELL/genidasack.py -v --alignment=mips64 -a -s \$WORKSPACE/dbgen/ose_signals_ADA.sdt -o \$WORKSPACE/\$Product//g;' ~/.local/bin/envsetup_sack.py");</p>
  
  <p>and i get following error</p>
  
  <p><strong>Bareword found where operator expected at -e line 1, near "s/$SHELL/genidasack.py -v --alignment=mips64 -a -s $WORKSPACE/dbgen"
  syntax error at -e line 1, near "s/$SHELL/genidasack.py -v --alignment=mips64 -a -s $WORKSPACE/dbgen"
  Search pattern not terminated at -e line 1.</strong></p>
  
  <p>i am completely lost what is causing this error; when i run the command manually everything works fine :(</p>