Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: A new perl {cough} feature?

by chipmunk (Parson)
on Feb 18, 2002 at 05:17 UTC ( #146103=note: print w/replies, xml ) Need Help??


in reply to A new perl {cough} feature?

The answers are:

1) Perl has a special value for undef, called SV_UNDEF. Rather than create a separate 'undef' for each uninitialized value, Perl stores a pointer to this special undef value. Thus, the output from Data::Dumper is, in a way, correct; all of the uninitialized array elements are pointing to the same value, SV_UNDEF.

2) Auto-vivification. grep { 1 } @$_ for @matrix; treats each element of @matrix as an array reference, so the uninitialized elements are autovivified.

Replies are listed 'Best First'.
Re: Re: A new perl {cough} feature?
by Anarion (Hermit) on Feb 18, 2002 at 17:30 UTC
    2.5) and why for can iterate over it and map chokes?

    Take a look at my code above

    $anarion=\$anarion;

    s==q^QBY_^=,$_^=$[x7,print

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://146103]
help
Chatterbox?
[Lady_Aleena]: shmem, sorry I was outside for a moment moving my car out of hubby's way.
[Lady_Aleena]: shmem, there is ONE song which throws a wrench in the works for both MP3::Info and MP3::Tag.
[shmem]: Lady_Aleena: fix it, or delete it ;-)
[Lady_Aleena]: shmem, I'm not sure how.
[shmem]: well, deleting is done with 'rm' :-P

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2017-04-23 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.