[Israel.pm] Another newbie question - Hashes

yuval at windax.com yuval at windax.com
Thu Feb 5 15:53:25 PST 2004


> It involves two magical concepts, $/ and local, which for a beginner are
> hard to understand and generally not very useful. So the phrase becomes
> a black magic spell you "just have to remember" without really
> understanding; I don't like those.

Again: my first answer was for newbies.
My second answer was a bit more complex (because of $/).
(BTW: people should be well aware of $/ !!!)

>> BTW, local automagically sets the variable to undef...
>
> Hey, I didn't know that! Thanks.

No problem. Keep that in mind :)
I think I learned that from "Coping with Scoping" by Mark Jason Dominus.

>> While is great for memory, pretty straightforward, but you don't want
>> ~10 lines handling such simple thing. 3-4 lines are usually great.
>
> I agree with that :)

Great :)
As long as you throw a nice comment before, there's nothing wrong about it...
Oh, you can also keep it in 3-5 lines with while() too.
When I'm back to work on Sunday I'll find more creative ways for this :)

I would just like to comment that I'm really enjoying this discussion.
Thanks to everyone who made a comment!


  --Yuval





More information about the Perl mailing list