Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Simon (89)

AOL IM: lathosjp (Add Buddy, Send Message)

Busy Man.

Journal of Simon (89)

Wednesday April 11, 2001
06:12 PM

Globs and Pang

[ #23 ]
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...