in reply to Re: how to make wildcard work in if (-e *..)
in thread how to make wildcard work in if (-e *..)

Beware that this executes the glob in a scalar context, which will really confuse you when you reexecute the code, since a scalar glob has local magical state. For example, run:
foreach $n (1..50) { print "$n: "; print "yes" if -e <*>; print "\n"; }
If you have seven files, every 7th number will be missing, because the glob has run out, and has returned undef, and is resetting.

This is better, as it uses glob in a list context:

print "Found textfile!" if () = <$dir/*.txt>;

-- Randal L. Schwartz, Perl hacker