Perl Survival (aka "trying not to blow my mind")
Posted by: Top Cat on 17 November 2004
Hi folks.
Anyone here a Perl expert? I've started working with Perl in the last few weeks. Thing is, I'm having to carry on the good work of a reputed Perl 'guru', and I know very little about it.
It's a bit scary, likes. I am usually pretty quick to pick new skills up, but this one is really battering my brain a bit...
Any tips as to how to quickly get up to competency in Perl 5.x? Especially interested in tips to avoid the impending mental implosion that I am sure will occur if I keep looking at gibberish like this...
$h{$B}||={}; $h{$B}->{$w}++; $t{$w}++; $l{$w} = $m if( not exists $l{$w} or $l{$w} < $m ); $t++;
Eh? What? Is it an explosion in a shift-lock factory, or a punctuation conference? Mental overload detected... warning! warning! warn[NO CARRIER]
Posted on: 17 November 2004 by Jay
quote:
$h{$B}||={}; $h{$B}->{$w}++; $t{$w}++; $l{$w} = $m if( not exists $l{$w} or $l{$w} < $m ); $t++;
You poor b*stard
Unfort I have little offer, apart from my sympathies!
Jay
Posted on: 17 November 2004 by sideshowbob
Perl is an abomination. If you really have to learn it, buy one of the several O'Reilly language guides. Better yet, employ somebody to rewrite it in a proper scripting language (Python would be my choice).
-- Ian
Posted on: 17 November 2004 by Paul Ranson
Python is an abomination, albeit less of an abomination than Perl.
Rewrite it in C++.
Paul
Posted on: 17 November 2004 by sideshowbob
Or better yet, rewrite it in Scheme.
-- Ian
Posted on: 17 November 2004 by Paul Ranson
Haskell is the obvious choice.
Paul
Posted on: 17 November 2004 by sideshowbob
Posted on: 17 November 2004 by Top Cat
OK, but re-writing it assumes that (a) I can find a spec to say what it is that it does, and (b) that I have an alternative I can easily use - this is all for unix scripting/piping/webby sorts of things...
Anyway, I can't recall anything quite so difficult to get my head around since the days of learning assembly. Thankfully, there's not so much call for that anymore...!!
John
Posted on: 17 November 2004 by seagull
(((just)(be)(grateful)((its)))not(lisp)))
Posted on: 17 November 2004 by Mekon
Lets be honest, there is no excuse; you are just lazy!
Posted on: 18 November 2004 by sideshowbob
quote:
Originally posted by Top Cat:
OK, but re-writing it assumes that (a) I can find a spec to say what it is that it does, and (b) that I have an alternative I can easily use - this is all for unix scripting/piping/webby sorts of things...
That's why I suggested Python, it is such an alternative...
Buy one of the O'Reilly books. They're as comprehensive a Perl reference as you are likely to find.
-- Ian
Posted on: 20 November 2004 by DLF
quote:
Originally posted by sideshowbob:
quote:
Originally posted by Top Cat:
OK, but re-writing it assumes that (a) I can find a spec to say what it is that it does, and (b) that I have an alternative I can easily use - this is all for unix scripting/piping/webby sorts of things...
That's why I suggested Python, it is such an alternative...
Buy one of the O'Reilly books. They're as comprehensive a Perl reference as you are likely to find.
-- Ian
TC, Python is a highly respected language in its own right. PERL isn't! FWIW the Google developers use Python.