Hi All, 
 
I my perl script is crashing perl at this line;
 
$image->Read (file=> \*ARGV);
 
I know that it is this line because I have commented out everything else
around it.  When I just have the Read statment, perl will crash.   Here is
the script, can someone please suggest what I am doing wrong.
 
Thanks!
----------------------------------------------------------------------------
---------------------
#!/user/local/bin/perl -w
 
use strict;
use Image::Magick;
 
my $images = "C:/images";
    opendir (IMAGES, $images) or die "can not open $images: $!";
 
# load @ARGV for (<>)
 
@ARGV = map { "$images/$_" } grep { !/^\./ } readdir IMAGES; 
 
my $image = Image::Magick->new(magick=>'JPEG');
 
# Read images, Scale down and Write to new directory
 
while (<>) {
    $image->Read (file=> \*ARGV)
    and $image->Scale (width=>'50', height=>'50')
    and $image->Write ("C:/images")
    and close (ARGV);
    }
 
closedir IMAGES;
 
Brian Volk
HP Products
317.289.9950 x1245
 <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
 
 

Reply via email to