THere's probably a more convoluted way of catching errors, and using __FILE__ to warn, but I was just interested if this option exists:
My perl script runs through a huge number of files, all named in very similar ways. They only really differ in the paths they exist in.
My problem is that Im reducing any output, so I do NOT want to use any print statements that say 'current working path is blah blah', so my log file is truly an error file.
However, one common error occurs because of wrong naming conventions within particular files, and I need to accomodate for these naming conventions, but it takes me a long time to work out which file it is, and this is especially because my error says something like:
Can't call method "blahblah" on an undefined value at /path/to/Module. +pm line 505, <FILEDATA> line 11.
So my question is, can I get Perl to output the actual filepath, instead of the name of the filehandle?
Cheers
Sam
In reply to Forcing perl to print filenames instead by seaver
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |