Changing to lexicals holding anonymous sub refs my $print_document = sub {} would solve the OP'S problem too.
Having persistent shared globals can be a desired effect. (Initialization overhead, communication channel)
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re^4: Variable will not stay shared in a sporadically crashing CGI
by LanX
in thread Variable will not stay shared in a sporadically crashing CGI
by Locutus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |