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

Re: Maintainable Code?

by jplindstrom (Monsignor)
on Nov 11, 2002 at 21:03 UTC ( #212091=note: print w/replies, xml ) Need Help??

in reply to Maintainable Code?

The only problem with hashes (and hashes of hashes) is that they are seen as "advanced" and noone talks about them until way to late, when the programmer already needs to use... composite data structures. In Perl you (as usual) have to make these for yourself using hashes.

I remember learning Perl. Until someone mentioned hashes when I asked for data structures, I thought that there was no such thing in Perl! The next, mountain like, hurdle was the syntax for dereferencing complex data structures (and subs returning e.g. hashrefs).

Explain these concepts by example and you don't have a problem.


Replies are listed 'Best First'.
Re: Maintainable Code?
by Abigail-II (Bishop) on Nov 12, 2002 at 16:48 UTC
    When I teach a Perl course, I tell them about arrays and hashes on the afternoon of the first day. Even before control structures like if and while (that's the morning of the second day).

    And in the morning of the first day, we talk about the history of Perl, the manual, CPAN, the manual, mailing lists, the manual, websites, use strict, the manual, use warnings, the manual, and how to run a Perl program. Oh, and how to use the manual of course.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://212091]
[Lady_Aleena]: This evening, I thought to myself, "I would love to search Netflix for 100 randomfilms from my database to see if they have them." So I went to CPAN to see if there were a modiule which could do such a thing. There is, but GUH! ...
[Lady_Aleena]: ... Does it have to be that hard and complex to use to do a search on Netflix?
Lady_Aleena grumbles.
[Lady_Aleena]: I really need to get back into the swing of Perl. I'm forgetting things from lack of use. I don't know how behind I am too.

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2017-01-21 02:32 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (180 votes). Check out past polls.