package global_stuff; use Error qw(:try); use strict; my $GLOBAL_VARIABLE = "IT'S WORKING FINE"; sub print_global_variable { #warn "global_variable = $GLOBAL_VARIABLE"; try { warn "global_variable = $GLOBAL_VARIABLE"; } catch Error with { }; } return 1;