Hmm. That Perl doesn't work. I'm sure that was in my copy of Learning Perl, let me go look it up.
The book has a wholly different method?
Apparently Perl has changed since this book was published in 1991? Huh. How dare.
@mwl You've got the 1st edition Camel Book, I assume? Which covers Perl 4, which was replaced circa ... 1992? Oh boy was that a fun learning curve!
Yep, first edition "with minor corrections." I studied it between support calls as I worked nights on my first tech job.
I claim I learned programming on zx81 BASIC (which is true), but the Camel Book made me a sysadmin.
Part of its brilliance was that it's about 250 pages. Nobody wants a doorstop when they're first learning a topic.
My tech books now? About 250 pages.
@mwl I tried doing something in perl recently, after almost a decade of no perl — and perl has changed, man. I am sure it's not me.
Still emotionally processing that.
@m Perl has added stuff, but my primordial perl5 still works fine.
@mwl Yep, I have the original first printing! Signed by Larry!
But Perl 5 is a very different beast. It broke continuity with the previous package system but added references and thus several different OOP paradigms and a HUGE range of extras. Embedded whitespace and comments inside regular expressions? Lexically scoped variables? References (aka pointers)? And modules with calling conventions and function prototypes and ...
Now if you had used awk(1) instead, code from the 1970s would still run just fine… 😛
cool!
and: oh, yeah, perl5 broke things. More of a learning curb.
I wrote perl4 for years after perl5 came out. Most often, I still do.
But 2005-ish I needed a Radius auth system that re-prompted for passwords every 15 minutes, and dragged myself through the Radius modules rather than write my own.
@mwl @m That’s quite a feat. The past few years it seems like each release has deprecations that hit formerly normal stuff. We’ve had a couple of these hit #SpamAssassin hard.
no, it just means my code is so simple and kludgy they can't deprecate it.
@mwl Makes sense, that they would take it out if it doesn’t work.
- replies
- 1
- announces
- 0
- likes
- 3
@mwl At one point I was very fluent in Perl 4 and stumbling through Perl 5 as it was being developed. Then I stopped doing much scripting for years in Perl moving to Python.
I had need of a quick script about two years back and the code that came out of my fingers simply didn't work. The language had changed too much. The only reason I didn't pick Python at the time was because, like most ugly reasons to use Perl, what I really wanted was PCRE and not to need sed.