title: How can I grep for a value from a shell variable?
body: <p>I've been trying to grep an exact shell 'variable' using word boundaries,</p>
  
  <pre><code>grep "\&lt;$variable\&gt;" file.txt
  </code></pre>
  
  <p>but haven't managed to; I've tried everything else but haven't succeeded.</p>
  
  <p>Actually I'm invoking <code>grep</code> from a Perl script:</p>
  
  <pre><code>$attrval=`/usr/bin/grep "\&lt;$_[0]\&gt;" $upgradetmpdir/fullConfiguration.txt`
  </code></pre>
  
  <p><code>$_[0]</code> and <code>$upgradetmpdir/fullConfiguration.txt</code> contains some matching "text".</p>
  
  <p>But <code>$attrval</code> is empty after the operation.</p>