subs.pm: fix variable leak into global scope