or download this
#!/usr/bin/perl -w
#use Image::Magick; # you don't need that if you shell out to convert
...
#system("convert -size 500x180 $file -auto-orient -thumbnail 250x90
+ -unsharp 0x.5 $rfile");
print "About to run [@cmd]\n";
system(@cmd) == 0 or die "Couldn't launch [@cmd]: $!/$?";