Perl global variables in strict mode

If you have a sub you want to read a variable from the global scope you can reference it via use vars.

sub foobar { use vars qw($debug); print "$debug is a global var"; }

Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
Logged IP:
To prevent spam please submit by clicking the kitten: