On Wednesday, May 15, 2002, at 10:14 , Connie Chan wrote:
> @filelist = &your_search_script_result();
> for (@filelist) { unlink ($_) }
now you're showing some step forward....
my complements!
for those who are wondering why beginners are here,
it's to learn and pass along that which they have learned!
two Nits:
you might want to think in terms
$filelist = your_search_script_result($dir, $recurse, $pattern,
$suffix);
unlink($_) for @$filelist ;
the former allows your function to be more readily
re-usable - in that it would allow both
$filelist = your_search_script_result( $dir, 0, undef, $suffix);
so that it would go after all files that end in $suffix
that exist in $dir, without recursing down through any sub directories.
{ yada-yada-yada....}
the second nit is that it appears that passing a reference
to the array seems to be reasonably mo-betta.... YMMV.
ciao
drieux
---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]