in reply to help,my upload script is bugged part 2

Add this code.  Also notice my $script is now assigned
twice, just move that to the top of the upload sub, it will make
the script a bit shorter.
....... ......... Uploading the file... <body><html> eof my $file = $q->upload('file'); my $filename = $file; #add starts here if ($filename !~ /(.gif|.jpeg|.jpg)$/){ print 'Files must be gif,jpeg, or jpg.<br>Please reselect<br>'; my $script = 'http://zentara.zentara.net/~zentara/up2.html'; print "<a href=$script>'Try again,please.'</a>"; exit; } #add ends $filename =~ s/^.*\///g; $filename =~ s/^.*\\//g; $filename =~ s/\-/_/g; $filename =~ s/^\.*//g; $filename =~ s/ /_/g; my $allpath = $file; if ($filename =~ /\./) { $filen = $`; $ext = $'; } ....... .......