Well, today I learnt more about globs than anyone really need know;
writing these tutorial notes is teaching me all sorts of things about
the internals of Perl. Sometimes I look deep into a corner and cringe
at how crufty it all is, but to be honest, it's far more common to me
to realise how cleverly it's all hung together. For instance, the symbol
table entry *main::a
is split into two parts: one just has
information about the "a
-ness" and the other part holds
the actual scalars and arrays and hashes and so on. Then when you want
to alias two globs with *a = *b
(which is, incidentally
done through the magic system) you just have both *main::a
and *main::b
point to the same second part. And that's
reference counted so it knows how many things are pointing at it. Very
clever.
However, contrary to popular belief, I don't actually get passionately
fired up by the Perl internals, and it was quite a struggle to get much
written today. The allure of retrogaming and Pang (which I completed
today) was too much. Looks like I'll have to reinstate my policy of
having a cron
job to apt-get remove xmame
for
me...