Justin du Coeur (jducoeur) wrote,
Justin du Coeur

[PROGRAMMING] The joys of context

May I just say, Perl is a bloody weird language?

Every couple of years I come across a project that requires some significant Perl hacking, and I brush it off. This time, I'm fiddling around in UseModWiki, to make it do what I want as a LARP-development environment. For the most part, that's entirely straightforward. But figuring out the appropriate syntax for dealing with my key data structure (a hash of hashes of arrays) is really mind-bogglingly tricky. I spent a good two hours just figuring out how to get things to dereference into the proper contexts, so that I stopped getting things like "ARRAY (0xabfoobar)" in my data files.

(Is there actually any documentation on the @{ } and %{ } operators? They're referred to all over the Perl docs, but I couldn't find anything actually telling me outright how you're supposed to use them, so I had to do a lot of trial-and-error experimentation.)

Oh, I'm sure that by the time I'm done, I'll have gotten my fluency back. But man -- after spending the past two years working primarily in C# and The Horror That Men Call ActionScript, Perl does require bending my brain into a pretzel...

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded