in reply to help with perl understanding
(Whups... forgot to log-in.)
One thing that might really throw you for a loop is, when you define a sub, “where are the parameters?!” Perl has the very peculiar strategy of placing all of the arguments to a function into an array (strangely-named “@_”) which is available to the function, and you'll see people grabbing parameters off of it with things like shift (which pops the first element from an array).
However, I must say that I do admire a language that makes it a trivial task to reverse two variables that are out-of-order: (This is a list assignment...)
... and it is very nice to work in a system that has a very well-thought-out notion of “lists” and “hashes,” even though the language bumbles through some of these concepts with (in my opinion) rather sickening syntax. (Hold your nose when you get to “contexts.”)($a, $b) = ($b, $a) if ($b > $a);
And let's face it: Messrs. Kernighan and Plauger put an assortment of “warts” into their language too, and by now we sort-of don't see them as warts anymore because we like what the language lets us do. The same's true of Perl. (It's a “teletype-era language” too, and sometimes it shows.) You'll scratch your head a lot, stick your tongue out at it a few times, roll your eyes and mutter under your breath, and in a matter of a few days or maybe a week or so, begin to get the groove of what all the fuss is about. Quite a few more “warts” here to be overlooked, but love is blind. ;-)