D
DMB
I have the following code:
if (-e $done_dir."BOB.DOC") {
print "found it\n";
} else {
print "nope\n";
}
where $done_dir contains the directory path of the file I'm looking
for.
I'd like to make it so that it doesn't matter what the filename is.
I'm only interested in the suffix. I was thinking along the lines
of...
if (-e $done_dir."*.DOC") {
print "found it\n";
} else {
print "nope\n";
}
but of course this does not work in perl. I'm sure there is an easy
solution to this, but I can't seem to find a example online or in any
of my books of using -e and wildcards.
Thank you for your assistance.
if (-e $done_dir."BOB.DOC") {
print "found it\n";
} else {
print "nope\n";
}
where $done_dir contains the directory path of the file I'm looking
for.
I'd like to make it so that it doesn't matter what the filename is.
I'm only interested in the suffix. I was thinking along the lines
of...
if (-e $done_dir."*.DOC") {
print "found it\n";
} else {
print "nope\n";
}
but of course this does not work in perl. I'm sure there is an easy
solution to this, but I can't seem to find a example online or in any
of my books of using -e and wildcards.
Thank you for your assistance.