On Sat, 2005-08-20 at 12:55 -0400, Todd Finney wrote:
> This is probably just an issue of style, but avoiding stuff like this...
> 
> our $x=10;
> 
> ....600 lines of code...
> 
> sub foo {
>          return $x++;
> }
> &foo();
> 
> ...strikes me as common sense.

Sometimes you actually need a persistent variable though, and "our" is
the preferred way to do it over the older "use vars".  I usually
capitalize globals to indicate they have a larger scope.

- Perrin

Reply via email to