flieckster:

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.