![]() |
|
There's more than one way to do things | |
PerlMonks |
Filechecks with wildcardsby Sprad (Hermit) |
on May 20, 2004 at 22:49 UTC ( [id://355114]=perlquestion: print w/replies, xml ) | Need Help?? |
Sprad has asked for the wisdom of the Perl Monks concerning the following question:
I want to have a generic copy function, with checks for existence, logging, etc. Part of it would be something like this:
if (-e $sourcefile) Which works fine if $sourcefile is something like 'c:\foo.txt', but if we're doing a wildcard copy, $sourcefile might be 'c:\foo\*.*'. -e doesn't work on that, since (I assume) it's looking for a file literally named '*.*'. Is there a trick to it?
---
Back to
Seekers of Perl Wisdom
|
|