in reply to
Re: asterisk use
in thread asterisk use
To slightly extend davido's explanation with a more concrete example (because that's how I learn anyway):
This first example uses the full variable name to find all instances of mail.log.* in the current directory and pushes the results on @files.
use File::Find;
find( sub { push @files, $File::Find::name if -f && /mail.log.*/ }, '.
+');
This second example does the same thing only using the glob'd version of the variable name.
use File::Find;
use vars qw/*name/;
*name = *File::Find::name;
find( sub { push @files, $name if -f && /mail.log.*/ }, '.');