Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

RE: (Slice 'em and Dice 'em) RE: Arrays are not lists

by tilly (Archbishop)
on Aug 05, 2000 at 19:20 UTC ( #26338=note: print w/replies, xml ) Need Help??


in reply to (Slice 'em and Dice 'em) RE: Arrays are not lists
in thread Arrays are not lists

D'oh. Thanks for pointing out my obvious typo. That is what I get for posting late at night without testing my code.

What I consider the most important point here is not that lists and arrays differ. Rather it is that there are a lot of ways in which scalar and array context can have unexpected behaviour, and there are a lot of hidden mines awaiting the person who does not think about which is which.

Being aware of the context and making a point of consistently exploring it will teach you a lot of nuances of code.

BTW I am no longer bitten by the difference between lists and arrays. There was a period when I realized that Perl really is list-oriented and I tried to make my code be list-oriented and I got bitten during the transitition...

  • Comment on RE: (Slice 'em and Dice 'em) RE: Arrays are not lists

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://26338]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2023-12-04 12:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (25 votes). Check out past polls.

    Notices?