in reply to Re: Where do you want to go today? (a little deeper than CGI.pm)
in thread Where do you want to go today? (a little deeper than CGI.pm)

Yarrg.

When I first started Perl in July last year (For a summer internship) I was fairly unaware of CPAN and wrote a few date manipulation routines for a smallish script I was working on. The guy who worked next to me, a seriously talented (double underline in bold) programmer, took one look at the code, pointed out a no-brainer in one of my assumptions and then commented that although it was very pretty, why didn't I use CPAN?

Uh, what's CPAN?

CPAN opened up an entirely new vista to me. In some ways this has made me guilty of mild 'cargo cult' programming as I don't really understand the complete inner workings of, say, CGI.pm, but it does allow me to build small applications very rapidly indeed and deals with several issues I otherwise wouldn't have been aware of.

The real point of this mail is that sometimes it is useful to write a quick 'n' nasty routine to do something that a module would do better: "Oh, your PC doesn't have Date::Manip installed and your network connection is down, uhmm okay. Epoch to Human readable shouldn't be too hard." One of the nice or nasty, depending on your point of view, things is that in Perl it is very easy to re-invent the wheel: It does nice things for you and makes the tricky very simple. Once, when I was about 12, I spent an afternoon writing a BASIC program to interconvert binary, octal, decimal and hexadecimal - this would probably take me about 5 minutes in Perl (I've no idea how to do it because I've never needed to, but a quick search here,in the blue camel and on CPAN would give me the answer doublequick.)

Perl is a natural language for quick 'n' dirty applications such as reformatting files, global search 'n' replaces and cronjob run data logging. It also does bigger things nicely, too. I like Perl.

I'm also having a go at reinventing the wheel: I'm going to try and build a Perl-only implementation of Blowfish when I have the time. I know that this has been done before (Hint, look at CPAN ;-) but I'm adding it to my list of things to do, including looking at Artemis, I haven't forgotten ichimunki I'm just busy with exams!

Elgon