(Sorry for the short e-mail.  Let&#39;s try that again... - Dan)<br><br>I have a file that has a number of lines in it.  Two lines contain data
I want, the rest are unimportant.  These two lines can appear most
anywhere and in any order.<br><br>What I&#39;m currently doing is this:<br>$val1 = 0;<br>$val2 = 0;<br>while (&lt;FILEHANDLE&gt;) {<br><font color="#888888">    
</font>$val1 = $1 if /^COUNT:\s*(\d*)$/;<br>     $val2 = $1 if /^SIZE:\s*(\d*)$/;<br>     last if ($val1 and $val2);<br>}<br><br>The &quot;last if&quot; statement is my attempt to exit sooner rather than working through the entire file.<br>
<br>I had tried to setup a map function something like this:<br>($val1, $val2) = map { <br>     return ($1, $val2) if /^COUNT:\s*(\d*)$/;<br>     return ($val1, $2) if /^SIZE:\s*(\d*)$/;<br>     } &lt;FILEHANDLE&gt;;<br><br>
...but I get a &quot;can&#39;t return outside of subroutine.<br><br>Am I better off with my while loop?  It passes the &quot;3AM readability test&quot; in my opinion.<br><br>Dan<br clear="all"><br><br>-- <br>&quot;Quis custodiet ipsos custodes?&quot; (Who can watch the watchmen?) -- from the Satires of Juvenal<br>
&quot;I do not fear computers, I fear the lack of them.&quot; -- Isaac Asimov (Author)<br>** *** ***** ******* *********** *************<br>