I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-07-14 11:33:27-07 by exiftool in response to 8294
Re: Help Using Conditional Logic Please
Hi Justin,

What you have done will work, except the Perl string comparison operators are "eq", "lt", "le", "gt" and "ge". The "=", "lt;", "lt;=", "gt;" and "gt;=" are numerical comparison operators. So your -if statement should be:

- if "$model eq 'NIKON D200' and $createdate ge '2008:03:30' and $createdate le '2008:06:10'"

Note that in general you have to be careful using "eq" to test Model strings because sometimes you get trailing spaces in the model name. But in this case, the D200 doesn't have this problem. However, the way around this for other cameras is to use a regular expression to look for a substring:

-if "$model =~ /NIKON D200/"

- Phil
Direct Responses: 8298 | Write a response