in reply to XML::XPath and processing multiple files

I tried a little test myself and I can reproduce the "Cannot open file ..." error by either not chomping the filename or by having the file not existing in the folder the script is looking at or by having a file that is not readable by the user or group that owns the script.

The new method just performs a -e and -r file test on the argument of new.

Do you provide the full file path in your list of files?

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics