C
christopher.prowse
Hi experts,
A quick (I hope) question...
I want to be able to verify if any directory that matches a simple
regexp exists, but using the -d flag. So for example, I would want:
if (-d "/opt/*abc") {
print "Directory exists\n";
};
to print "Directory exists" if there are any directories such as "/opt/
abc", "/opt/123abc", "/opt/asdfghabc", and only fail the condition if
nothing meets it. More than one directory conforming to the regexp
should also successfully print "Directory exists".
Thanks in advance,
-Chris
A quick (I hope) question...
I want to be able to verify if any directory that matches a simple
regexp exists, but using the -d flag. So for example, I would want:
if (-d "/opt/*abc") {
print "Directory exists\n";
};
to print "Directory exists" if there are any directories such as "/opt/
abc", "/opt/123abc", "/opt/asdfghabc", and only fail the condition if
nothing meets it. More than one directory conforming to the regexp
should also successfully print "Directory exists".
Thanks in advance,
-Chris