title: If statement with multiple conditions in perl
body: <p>I'm trying to construct an <code>if</code> statement with multiple conditions without being too verbose. Currently I have: </p>
  
  <pre><code>my $string = "Hamburger";
  my @string_as_array = ( $string =~ m/.../g );
  my $x=(scalar @string_as_array);
  for(my $i=0; $i&lt;$x; $i++)   {
      if ($string_as_array[$i] eq "Ham" || $string_as_array[$i] eq "bur") {
          print "CHEESE";
      }
      elsif ($string_as_array[$i] eq "ger")   {
          print "WICH";
      }
      else {
          print $string_as_array[$i];
      }
  }
  print "\n";
  </code></pre>
  
  <p>Ideally I'd like something like this for the first <code>if</code> statement if it is possible:</p>
  
  <pre><code>my $string = "Hamburger";
  my @string_as_array = ( $string =~ m/.../g );
  my $x=(scalar @string_as_array);
  for(my $i=0; $i&lt;$x; $i++)   {
      if ($string_as_array[$i] eq "Ham" || "bur") {
          print "CHEESE";
      }
      elsif ($string_as_array[$i] eq "ger")   {
          print "WICH";
      }
      else {
          print $string_as_array[$i];
      }
  }
  print "\n";
  </code></pre>
  
  <p>If it's possible. </p>