title: Perl regex pattern match with saved variable
body: <p>I need to do pattern match with two variables one contains the string and the other contains the regex pattern 
  I tried with the following program </p>
  
  <pre><code>#!/usr/bin/perl
  my $name = "sathish.java";
  my $other = '*.java';
  if ( $name =~ m/$other/ )
  {
    print "sathish";
  
   }
  </code></pre>
  
  <p>kindly help where am missing</p>
  
  <p>Thanks
  Sathishkumar</p>