Hi,
I am wanting to search for file names that conform to a certain pattern. I want to read the pattern from a config file, something like aaaa-nnnnnnnn. The config part is not the problem, the template bit is. This config value should match files that have 4 alpha characters, then a -, then 8 numeric characters.
I have looked (a bit) for template modules but the majority of these are for HTML.
Some pseudo code to try and help explain.
The files I want to do something with look something like ABCD-13022003*.* or even ZZZZ-99999999*.* I would also like to be able to change the config to something like aa-nn-aa, which would match XX-55-DD*.* files.*** Get aaaa-nnnnnnnn from config file *** I am using XML::Simple while ($file = readdir DIR) { next if $file =~/^\./ || $file not matched by $filename_template; *** Carry on to do something with a file that does conform...
Has anyone any direction to point me in?
-----In reply to Filename Template by AcidHawk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |