DaRedMonkey
IS-IT--Management
How come this doesn't work? I keep beating my head, but I just couldn't figure it out?
$filepattern =~ /^[a-z,A-Z]{3}\d{6}\.\d\d$/;
$fullpath = $datadir."/".$filepattern;
if (-e $fullpath) {
blah blah
}
In the directory I have files:
ABC123456.01
ABC123456.02
ABC123456.03
CDE123456.08
I would check to see if there is any file in that directory with that pattern, if the file exist, then I would add the name of the file to an array. Then, I would use that array ot iterate through and process each file.
Any help would be greatly appreciate. Thans alot.
-DRM
$filepattern =~ /^[a-z,A-Z]{3}\d{6}\.\d\d$/;
$fullpath = $datadir."/".$filepattern;
if (-e $fullpath) {
blah blah
}
In the directory I have files:
ABC123456.01
ABC123456.02
ABC123456.03
CDE123456.08
I would check to see if there is any file in that directory with that pattern, if the file exist, then I would add the name of the file to an array. Then, I would use that array ot iterate through and process each file.
Any help would be greatly appreciate. Thans alot.
-DRM