in reply to these aren't locals, but they seem to act like it

Since jdporter seems to have identified the problem, here's a fairly clean way to do what you want with a minimum of typing:
($flags, $img, $name, $big, $gallery, $page, $caption. $num ) = @$opts{qw(flags img name big gallery page caption num)};