|
|
|
|
|
by fragmede
177 days ago
|
|
> a famously hard to read language. That's putting it lightly. Many jokes were made at Perl's expense on that topic, but $\=$/;for(@ARGV){open F,$_;while(<F>){print if/$_/}}
is a valid Perl program to grep for lines that are the file's name. One of the jokes was that it was a write only language and it was only half way a joke. Coming back to a pile of magic variables months later with no comments, omfg. Meanwhile, Python sometimes scarcely even needs commenting if it's a short script if the writer uses descriptive function and variable names.Perl's downfall, was that coming back to a ball of Perl mud after say 3 years and have to fix a bug, due to lack of classes and Perl 6 being delayed forever, you were in for not lot of fun. Python isn't perfect and that's why it's grown types, but Perl was seriously write only at times. |
|
Nobody should be spending a day writing Python to do work that can be done using a vim macro in like 5 mins. Or spend a year doing in Python what can be done in a week in Perl.
>> $\=$/;for(@ARGV){open F,$_;while(<F>){print if/$_/}}
There are lots Perl one-liner patterns, once you learn to write them. You are basically saving yourself writing many dozen man-hours of Python/Java coding work.
I remember telling my manager during the Perl days. A 10 year Java experience guy looks great, but thats basically a junior Perl dev with 6 months experience.
There is nothing to feel great about wasting effort and more importantly time.