Help for this page
my $jpeg = 'jpg'; if (lc(substr($upload,length($upload) - 4,4)) eq $jpeg){ ...do crap }