good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
difficult error checkingby Anonymous Monk |
on Jan 28, 2004 at 19:48 UTC ( [id://324757]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I don't know what to call this, but I'm confused! I have a form that uploads images (upload#). Since I have the option of uploading more than 1 file at a time, I pass the work to a subroutine with an increment on $num.
Everything works fine except the new error checking I tried to make. Since each image filename is stored into a hash, I need them to be different. I tried using a foreach(keys.. to check, and this DOES work...kind of. The problem is, if upload1 and upload2 are unique, but upload3 isn't, images 1 and 2 will be sucessful and image 3 will die. Likewise, if image 1 is a duplicate and 2 and 3 are different, because image1 dies, the rest can't be successfull. Can someone help me figure out a way to set it up to print "$filename was uploaded" for ALL images that are unique, even if the image before it was a duplicate? An example:
SCRIPT:
Back to
Seekers of Perl Wisdom
|
|