It&#39;s probably been years since I&#39;ve done anything more than a 5 line Perl script, or just did minor fixes on someone else&#39;s code.&nbsp; But we have a log scraper that, uh, well, sucks and I&#39;m the only one brave (or stupid) enough to change it.<br>
<br>One of the things that I want to do is to grab the latest file under a directory with a pattern.&nbsp;&nbsp;&nbsp; And, since I want it to find the file recursively, I know I need to use File::Find. The fl<br><br>sub logFinder {<br>
&nbsp; my $proc=&quot;pat&quot;<br>&nbsp; my @files=(); <br><br>&nbsp; sub wanted {<br>&nbsp;&nbsp;&nbsp;&nbsp; /^$proc.*/s<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;&amp; push(@files,$File::File::name);<br>&nbsp;&nbsp; }<br><br>&nbsp; find(\&amp;wanted ,$logdir);<br><br>&lt;yadda-yadda&gt;<br clear="all">
<br>My &quot;wanted&quot; will give me a list of files the first time I access logFinder, but the next time I run it, the values in @files are not refreshed.<br><br>So that&#39;s what I got.&nbsp; I know someone here can do better . . . <br>
<br>-- <br>Mike Hostetler<br><a href="http://mike.hostetlerhome.com/">http://mike.hostetlerhome.com/</a><br><br>