sub Get_Saves { my @files; #Just a small mod here. Call FileName since it now #returns a suitable closeure, and pass in the #reference to @files so that FileName knows #where to add stuff. @files=find(FileName(\@files),"/usr/local/apache/htdocs/service +/"); return \@files, $#files+1; }##END Get_Saves sub FileName { my $files_ref=shift; #Use reference to array return sub { unless (($_ eq "." )or ($_ eq "temp.svd")){ push @{$files_ref}, $_; } #removed this since returning anything from the #wanted function does not really make any sence(See #File::Find) #return @files } }