#!/usr/bin/perl -w use strict; use Image::TestJPG; my $file="/main/images/temp/image.jpg"; # read data from a file open(JPEG, "$file") or die "Can't open $file : $!\n"; my $jpgData = ; close(JPEG); my $length=length($jpgData); print "LENGTH: $length\n"; # test the data my $rv = Image::TestJPG::testJPG($jpgData,$length); print "RV: $rv\n"; # do something based on the return value if($rv) { print " ... jpeg data is valid ...\n"; } else { print "... jpeg data contains errors ...\n"; } #### my $rv = Image::TestJPG::testJPG($jpgData, $length); print "RV: $rv\n"; #### Use of uninitialized value in concatenation (.) or string at ./CCIMGVERtest.pl line 20. RV: #### binmode JPEG;