title: Embedding evaluations in Perl regex
body: <p>So i'm writing a quick perl script that cleans up some HTML code and runs it through a html -> pdf program. I want to lose as little information as possible, so I'd like to extend my textareas to fit all the text that is currently in them. This means, in my case, setting the number of rows to a calculated value based on the value of the string inside the textbox.</p>
  
  <p>This is currently the regex i'm using</p>
  
  <pre><code>$file=~s/&lt;textarea rows="(.+?)"(.*?)&gt;(.*?)&lt;\/textarea&gt;/&lt;textarea rows="(?{ length($3)/80 })"$2&gt;$3&lt;\/textarea&gt;/gis;
  </code></pre>
  
  <p>Unfortunately Perl doesn't seem to be recognizing what I was told was the syntax for embedding Perl code inside search-and-replace regexs
  Are there any Perl junkies out there willing to tell me what I'm doing wrong?
  Regards,
  Zach</p>