in reply to Using strict with globals
. . . one of the finest benefits of strict is lost: prevention of typos.
I hate to nitpick, but your next sentence:#!/usr/bin/perl use strict; $main::foo = 'bar'; $main::baz = 'qux'; $main::foo .= $main::bza;
The vars pragma will catch this:
Did you mean strict will catch this? Apologies if I'm mistaken (since I don't know much about vars), if I'm wrong could you expand on that point, as I feel I need to understand why.
Good post!
--Jim
Update: Ah yes, the synergy of the two makes more sense. Thanks, Ovid.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid) Re: Re: Using strict with globals
by Ovid (Cardinal) on Jan 04, 2002 at 02:44 UTC |