|
In a message dated 6/23/2006 12:30:35 P.M. Eastern Standard Time,
[EMAIL PROTECTED] writes:
> hi charles --
> > In a message dated 6/22/2006 10:38:47 P.M. Eastern Standard Time, [EMAIL PROTECTED] writes: > > > BEGIN { > > > > my @pad = (some large list of numbers); > > > > ... > > > just a point of curiosity... > why is @pad defined inside a BEGIN block instead of just any old block? > > regards -- bill walters a little more reflection is sometimes useful.
the answer, correct me if i'm wrong, is that placing @pad in
a BEGIN block closure
allows one to be sure that the array will be initialized before any of the
functions that
depend upon it are run, whereas if it was in an ordinary block closure one
could not
be so assured.
bill
|
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
