*Every* time, I just about give up because I can already do the task in bash, awk, php or icon so why am I bothering with perl? :-/ Still, great respect for what's been achieved and all that. Just not my cup-of-tea.
Wade.
I've tried to learn Perl several times.
*Every* time, I just about give up because I can already do the task in bash, awk, php or icon so why am I bothering with perl? :-/ Still, great respect for what's been achieved and all that. Just not my cup-of-tea.
Wade. Q:Is it proper to eat cheeseburgers with your fingers? A:No, the fingers should be eaten separately. |
|
Learning Perl is like learning a core language facility
Sure, you CAN type line noise.
Or you can use it for a far higher level of grunting. Or it can be poetry. Pretty much like any very expressive language. Those that have spent years programming in straight jackets (or constricted pipe lines with an occasional escape to some 'C') it is a godsend. Kind of like AWK. I spent years grokking cut, paste, sort, uniq, tr, etc, etc. But the AWK man pages sucked, and each time I tried to use it, I found myself falling back into what I knew. And then I got the MS-DOS MKS toolkit, which includes really good docs for AWK. 2 years later, I fell into Perl, with an AWK mindset. That worked. Keep in mind, Perl is an organic aggregation of many unix utilities, then tied together by a single mind. Some utilities, like find, have been turning into a callback engine. http://perldoc.perl.org/File/Find.html |
|
What's the point?
When there are scripting languages that are just as expressive, just as powerful, and a hell of a lot easier to read and understand?
Regards,
-scott Welcome to Rivendell, Mr. Anderson. |
|
Ah, welcome to the expanding fray
The point isn't to use Perl. The point is to use something better than a stack of error prone pipes, when possible, for the big tasks that they were never envisioned for.
I use perl, and am happy to help in that direction, because it is what I know. I am NOT positioning it as the best of the class. Given a fresh start, it would be python or ruby for me. |
|
I hopped from Perl to Python...
...when I had to recycle some well-commented and neatly written Perl that was a few years old. I had to do a code walkthrough just to work out what the hell I was on about. I believe the words "fuck this shit" may have slipped out.
I can pick up my old Python code and understand it straight away, by contrast. Not that I've written code of any description for a couple of years, mind... |
|
Yeah, but
I was under the impression you didn't consider yourself a programmer.
So any code switch is to be taken with a lot of questions. Which I don't feel like asking, so I'll drop it. |
|
No, it's fine. I don't consider myself a programmer.
I switched because the occasional, sporadic nature of that sort of work meant that I often had to get back up to speed with a bit of code with as little difficulty as possible, in as short a timeframe as possible.
I was better at writing Perl than I was at Python, but I could read Python code after the fact better than I could Perl. I could probably have circumvented it by commenting my Perl properly, and using the long version of the inbuilt operators, but hey. That'd have been too easy. I did find Python's regex stuff nicer to use than Perl's, though. Which is not what I expected at all. |
|
Quite.
I've been known to say that if you know a complex tool like Perl well, then go right ahead and use it for your own scripting purposes.
Most of my pipe-like processing is one-off and involves SQL and numerous trips through an editing session in vi (regexp replace FTW! when they work...). If it has to become something re-usable, then it gets turned into something much more robust, like a PHP script or maybe a bash script. I leave little pipe tools to things they are good at (grep comes to mind). Wade. Q:Is it proper to eat cheeseburgers with your fingers? A:No, the fingers should be eaten separately. |