title: Perl replace multiple strings simultaneously
body: <p>Is there any way to replace multiple strings in a string?
  For example, I have the string <code>hello world what a lovely day</code> and I want to replace <code>what</code> and <code>lovely</code> with something else..</p>
  
  <pre><code>$sentence = "hello world what a lovely day";
  @list = ("what", "lovely"); # strings to replace
  @replist = ("its", "bad"); # strings to replace with
  ($val = $sentence) =~ "tr/@list/@replist/d";
  print "$val\n"; # should print "hello world its a bad day"..
  </code></pre>
  
  <p>Any ideas why it's not working?</p>
  
  <p>Thanks.</p>