Comparing Perl to Python and Rust is like saying "I'm moving on from Linux, to Python!" It doesn't make sense, because Perl is different:
"Perl is, in intent, a cleaned up and summarized version of that wonderful semi-natural language known as "Unix"." --Larry Wall. Apr 6, 1994No one is crusading to replace cat with a dog that does the same thing, because we already have cat, and Unix has been summarized by Perl!
"It seems like there’s an opportunity for a lightweight statically-linked scripting language. Something between Go and Python." --https://news.ycombinator.com/item?id=20111696where Perl is really good
Perl is really good at almost everything it can do which is almost anything thanks to its flexibility, the devoted devs, and the generous people of CPAN.
where it is actually used nowadays
Perl is everywhere doing pretty much everything just like any standard unix tool so, astronomers (for real-life example), can cook up a clock after supper to watch Julian time fly:
where it excels compared to languagesperl -MAstro::Montenbruck::Time=jdnow,jd2mjd,jd_cent -e '$|++;print sp +rintf("%-22s","Julian day").sprintf("%-22s","Modified Julian day").sp +rintf("%-22s","Julian centuries since J2000.0")."\n";while(){$j=jdnow +();print"\r".sprintf("%-22s",$j).sprintf("%-22s",jd2mjd($j)).sprintf( +"%-22s",jd_cent($j));sleep 1}'
#!/usr/bin/perl =head1 DESCRIPTION Watch Julian time fly... =cut use strict; use warnings; use Astro::Montenbruck::Time qw[jdnow jd2mjd jd_cent]; $|++; print sprintf("%-22s","Julian day"). sprintf("%-22s","Modified Julian day"). sprintf("%-22s","Julian centuries since J2000.0")."\n"; while () { my $j = jdnow(); print "\r". sprintf("%-22s",$j). sprintf("%-22s",jd2mjd($j)). sprintf("%-22s",jd_cent($j)); sleep 1 }
The more tools in your programmer's box the better, so learn some trendy languages to talk to the kids. Meanwhile cat, sed, awk, cut, tr, grep, diff, patch, head, tail, sort, bash, perl and more written in C continue to make the world go round. "Let's talk about the language your favorite language is written in!" ;-)
In reply to Re: Is it worth knowing Perl? Real-life examples please
by Anonymous Monk
in thread Is it worth knowing Perl? Real-life examples please
by Anonymous Monk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |