We don't bite newbies here... much | |
PerlMonks |
Re^3: What does my @x= (undef)x7; do?by BrowserUk (Patriarch) |
on Nov 09, 2015 at 15:32 UTC ( [id://1147260]=note: print w/replies, xml ) | Need Help?? |
What’s going on? The explicit method populates the array with 7 physical pointers to undef:
Whereas, when you pre-extend the array, no physical pointer are populated; the undef's are implied by the absence of pointers:
Perl code would treat the two the as the same, but user-written XS code makes assumptions. Thanks for checking it. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|