Since line 42 is printing the value in $info->{$_} for key $_, it simply means that the key has no value for it. It may be possible that the ImageTool call is failing because it can't find the file you're specifying. Since you're changing directories between fetching the filenames and processing them, it could be that you just need to ensure you're providing a correct relative or absolute path to the file.
I'd also suggest checking out what error conditions you can expect from Image::ExifTool to see if it's working properly. (I just tried to review the docs for it, but cpan.org is feeding me blank pages at the moment when I give it a search term.)
Another thought: some images might not have values for the tags you're checking, so you might want to check the existance of the tag before printing anything:
foreach (@tags) { if (! exists $info->{$_}) { print "file $file doesn't have tag $_\n"; } elsif (! defined $info->{$_}) { print "file $file has tag $_, but it has no value\n"; } else { print "$info->{$_}\t"; } }
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re: date created in exiftool
by roboticus
in thread date created in exiftool
by flieckster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |