in reply to Re: Blessed be the OOP'ers
in thread Blessed be the OOP'ers
More specifically, the original code could be written this way:
my $employees = [];
Hopefully that makes it clear that a list enclosed in square brackets is an anonymous list. Assigning that somewhere creates a reference. (That's why you can stuff it in a scalar.)
The original code creates @employees and sets the first (and only) element to a reference to that anonymous list.
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: RE: Re: Blessed be the OOP'ers
by pemungkah (Priest) on Jun 29, 2000 at 02:34 UTC |
In Section
Seekers of Perl Wisdom