You can make your %junksites variable persist either by moving it outside the sub (in a block lexical scope) or by making it a state variable.
For a simple example of these two approaches, see the %rtoa variable at:
In reply to Re^5: Hash versus chain of elsifs
by eyepopslikeamosquito
in thread Hash versus chain of elsifs
by mldvx4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |