title: In Perl, I need to read a .conf file that contains condition like $a>$b based on the result of the condition i have to execute either if or else block
body: <p>The content of <code>condition.conf</code>:</p>
  
  <pre><code>condition1=$a&gt;$b
  </code></pre>
  
  <p>Example Perl code:</p>
  
  <pre><code>$cnd_ConfFile = $ARGV[0];
  open(CONDITIONS, '&lt;', $cndConfFile);
  
  $cndCount=0;
  while ( &lt;CONDITIONS&gt; ) {
          chomp; # no newline
          s/#.*//; # no comments
          s/^\s+//; # no leading white
          s/\s+$//; # no trailing white
          next unless length;
          ($var, $value) = split(/\s*=\s*/, $_, 2);
          $cndOnCounterValues[$cndCount++]=$value;
  }
  
  close CONDITIONS;
  
  $cond = $cndOnCounterValues[0];
  print "\n$cond\n";
  
  $a=3;
  $b=5;
  
  if($cond){
    print "a is greater then b";
  }
  else
  {
    print "b is greater then a";
  }
  </code></pre>
  
  <p>The above code always gives the output "<code>a is greater then b</code>".</p>
  
  <p>Regardless of the values of <code>$a</code> and <code>$b</code>.</p>