From my diary

I’ve spent some time messing around with perl yesterday and today.  I’ve been trying to find a way that I can edit a page using FrontPage — my usual HTML editor — and do footnotes inline, using <ref>…</ref> tags, just as if I were in Wikipedia.  A perl script then reads the file, strips out the references, inserts a [1], [2], and dumps all the footnotes at the end. 

It’s sort of working.  It’s not that complex a script, although if I didn’t hate perl so much it would probably be done by now.  The language always fights you, unless you immerse yourself in it, which of course occasional users like myself never do.

It still needs a bit of work, tho.

5 Responses to “From my diary”


  1. Steve Bricker

    I tried learning Perl for scripting at my job and abandoned it for Python. The latter’s structure was more to my liking, plus the functions I wanted were readily available. Python for Dummies is still a constant companion.

  2. JB Piggin

    Of course one could ask whether one *needs* to dump all the footnotes at the end. I keep notes at their natural places in the running text and simply change their enclosures from ref /ref to span /span and displace them into the right margin as sidenotes using CSS. It still looks a bit untidy on my website because I still haven’t got around to styling the different paragraph formats, but I think it is a much more natural way of reading text with an apparatus on a screen.

  3. Roger Pearse

    Ruby is a better perl, but in truth all these scripting languages are a bit rubbish. Never looked at Python, but perhaps I should.

  4. Roger Pearse

    Interesting idea with changing ref to span. I might experiment with this. Don’t you hate CSS, tho?

  5. Rob Flammang

    “The language always fights you, unless you immerse yourself in it.”

    So true. And not just of Perl.

    As a big fan of Perl, and completely immersed in it, I offer you my help if you want it.