Problem with Image::Info



I am trying to write a perl cgi script using Image::Info. The problem
is
I am not getting any info from Image::Info. The hash comes back
empty.
If I reduce my script down to what is shown below the page that gets
displayed
only has the photo. If the hash wasn't empty "Good" should be
displayed above
the photo. I have never used Image::Info before. I am using the
module
description in CPAN, there are no error messages in the browser
error log and the page is being displayed. Are there any suggestions?

Gary

#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
use Image::Info qw(image_info dim);

my $Photo = param('photo');
my $info = image_info("$Photo");

print header;
print start_html(-title=>'My Photos', -bgcolor=>'#FFDEAD');

if (%info){
print "Good <br> \n";
}

print "<img SRC=\"$Photo\"/>",
print end_html;

.



Relevant Pages

  • Re: Net::SFTP::Attributes
    ... no matter what I do dealing with $ref always seems to be ... "empty" is a term that applies to lists, arrays, and ... be called and given a reference to a hash with three keys: ...
    (comp.lang.perl.modules)
  • Re: Check empty hash
    ... But how can test in by script that the hash is empty? ... Regards, ... you are not the intended recipient, please notify the sender at Wipro or Mailadmin@xxxxxxxxx immediately ...
    (perl.beginners)
  • Re: How to implement a Hash Table in C
    ... snip ... ... and 7 empty, so the table is only 60% full). ... This assumes that quadratic probing is the best overflow handler. ... I have found that hash tables which are an integral power of 2 in size ...
    (comp.lang.c)
  • Re: why is empty hashref true?
    ... How can I tell if it's empty? ... The hash you have created hash a single element with a key of 'test' and a value ... of a reference to an empty hash. ...
    (perl.beginners)
  • Re: Clear a hash
    ... it deletes hash entries. ... the proper way to empty a hash is to assign it an empty list: ... let the hash exit scope and if it was declared correctly it ...
    (perl.beginners)