Shawn Wilson wrote: > i have a couple of questions on File::Find and Image::Info ; > > 1. why is my if statement not working to detect when i have a > directory: last if ($file eq $dir);
Why do you think it isn't working? Unless your version of Perl bahaves differently I would expect it to work but give an 'Exiting subroutine via last' warning. You should be using 'return' to exit a subroutine. > 2. why do i get this message when i finally do get to an image: > Not a CODE reference at ./bigimg2.pl line 39. > (this is displayed once an image is found) > > and line 39 states: > $type = $info->(file_ext); # three letter image > type You are using the wrong sort of brackets. Parentheses mean that $info must be a code reference, whereas it is actually a hash reference whish needs braces around the key value: $type = $info->{file_ext} > 3. does it make any difference to Image::Info if i do the above or put > single quotes ( ' ) like: > $type = $info->('file_ext'); > because the former doesn't work with strict. and of coarse i am > havving a problem with that line (and probably the following 4) so, i > was just wondering if this could be a part of it... $info->('file_ext') is the same thing as $info->(file_ext) without strict 'subs' in effect, but both forms are permitted within braces and mean the same thing. Never disable 'strict' to avoid errors - it is a false economy. In this case it was pointing to the incorrect brackets! > any help would be appreciated.... the full code is as follows: [snip code] I hope this helps, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]