print $debug;
produces
i 0 ui i 1 ui logo_graphic i 2 ui photo1 i 3 ui photo2 i 4 ui photo3 i 5 ui photo4
Yeah, I know, it SHOULDN'T. element 0 should be 'agent_photo'.
No other references to @uploads anywhere else. No shift, splice, pop, no reference even to a scalar called $uploads. What would cause element 0 to cease to exist? This simple problem is driving me bananas, anyone got any ideas?
EDIT: foreach $u (@uploads) produces the same result. Weird . . .
I'm in the habit of restricting variables to subroutines religiously using the my keyword. So much that I forget I even do it. But this is an old dusty script that wasn't restricting variables.
foreach $pic (@uploads) {
-- upload
--resize
}
The resize routine uses imageMagick and ALSO the var $pic, then undefines it when done.
DOH!
It threw me off badly because there was no reference to @uploads anywhere. Added the my lists to all the subs and poof the problem went away (of course.)
<welcomes the perl boot from all>
Thanks for looking everyone! :-)