sauoq and webfiend give you what's usually the best answer, to make the variable lexical with my.
Other ways are our $counter; which produces a scoped global, use vars '$counter'; which adds its argument list to the current namespace, or always referring to $counter as $main::counter (perhaps) which is the literal cure to the strict complaint, but awkward.
After Compline,
Zaxo
In reply to Re: Error msg "requires explicit package name"
by Zaxo
in thread Error msg "requires explicit package name"
by Theo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |