in reply to Re: Confusion about BEGIN block
in thread Confusion about BEGIN block
From the Camel Book, it says "In this respect (referring to the scoping of our) it differs from use vars, which affects the entire package and is not lexically scoped.
I tried
and it still complained. Is this because use strict truly insists on the our and/or my for all symbols?#!/usr/bin/perl use strict; print keys %aa,", $bb, @cc\n"; BEGIN {use vars qw(%aa $bb @cc); %aa=(1,11); $bb=22; @cc=(3,33); }
Sandy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Confusion about BEGIN block
by davido (Cardinal) on Oct 15, 2004 at 16:14 UTC | |
|
Re^3: Confusion about BEGIN block
by borisz (Canon) on Oct 15, 2004 at 15:59 UTC |