On Jul 16, Eric Chun said:
> #!/usr/local/perl -w
> my ($summary_data);
> $summary_data->{'express'} = "blahblahblah\n";
> print $summary_data->{'express'};
>Notice that $summary_data is not initialized, so when used as a reference,
>it will point to the memory address 0x0 because perl automatically gives
>undefined variables the value of zero. My question is how can this work
Um, it does NOT point to memory address 0. Just because the value is
undef does not mean it points to memloc 0x00000. It means the VARIABLE
has no value.
When you use an undef variable as a reference, the reference is
"auto-vivified" (brought to life automagically).
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
Are you a Monk? http://www.perlmonks.com/ http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc. http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter. Brother #734
** Manning Publications, Co, is publishing my Perl Regex book **
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]