Error435/Can't read from a filename contained in array/var
Posted: 2010-08-22T08:37:04-07:00
Hi all, I'm very much a perl newbie, so apologies if this turns out to be a perl problem and not strictly and perlmagick one..
I can get the following to work without issue:
..but really I want $imagepath to be an element of an array (because I intend to iterate through the array). However, this wont work for me:
It simply wont read the image.
@images is a properly defined array with 16 elements:
Produces the following in either!! of the above cases:
I can get the following to work without issue:
Code: Select all
$teampath = "/var/www/team1";
$player=Image::Magick->new;
$imgpath = $teampath . "/img/player.png";
$player->Read("$imgpath")
Code: Select all
$teampath = "/var/www/team1";
$player=Image::Magick->new;
$imgpath = $teampath . "/img/" . $images[0];
$player->Read("$imgpath")
@images is a properly defined array with 16 elements:
Code: Select all
print "$imgpath\n";
Any ideas what I'm doing wrong folks?/var/www/team1/img/player.png