>>>>> "Tony" == Tony Payne <[EMAIL PROTECTED]> writes:

Tony> On Tue, 2002-05-14 at 14:48, Myk Melez wrote:
>> my $bar = { foo => @foo };

Tony> That's equivalent to 
Tony> my $bar = { foo => undef };

Not really.  Depends on what's in @foo.
if @foo = qw(1 fred 3), then it's equivalent to

my $bar = { foo => 1, fred => 3 };

Hence, it's nearly never what is wanted.

Tony> did you mean this:
Tony> my $bar = { foo => \@foo };

Yeah, I like that.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


Reply via email to