my $img_file = "$form{filename}/$form1{$this_loop}"; open(FILE, ">$img_file") or die "can't open $img_file: $!";