At least it's not 3:00.
The little refs problem got nailed down; now, I'm having trouble with the modifications I made to the state mechanism from the Perl Cookbook. :\ It'll look easier tomorrow morning, after a few fitful hours of rest and some more weird dreams.
Still haven't remembered the Perl dreams yet.