Hi,
The module
Archive::Any may be worth looking at.
However, I am not sure that this is something you want to be doing.
Depending on what your script does, and how often you want to read the template files this may be an inefficient approach to take. Could you describe what your script is doing (or better yet, post the code) and how often it runs (is it a script you intend to run at time intervals) and so on.
Hope this helps,
Martin