Y
yashgt
I have a program that deals with files with names such as
SA_2005-01-03_01-00-00_sqf1974_1.0.0_Iub_Iu_CT.csv
The format is SA_<date>_<time>_....
Befor processing a file, I would like the program to validate the
filename by checking whether the date and time parts are correct.
I tried using mktime, hoping for perl to return an error value if the
date and time are wrong. But for some reason even if I give plain text
in the time part, mktime does not return an error. I use
ActivePerl 5.8.2 on Windows 2000. This does not have the Date module.
Can someone suggest a way to do the validation?
Thanks
Yash
SA_2005-01-03_01-00-00_sqf1974_1.0.0_Iub_Iu_CT.csv
The format is SA_<date>_<time>_....
Befor processing a file, I would like the program to validate the
filename by checking whether the date and time parts are correct.
I tried using mktime, hoping for perl to return an error value if the
date and time are wrong. But for some reason even if I give plain text
in the time part, mktime does not return an error. I use
ActivePerl 5.8.2 on Windows 2000. This does not have the Date module.
Can someone suggest a way to do the validation?
Thanks
Yash