everyone is "talking" Python (or R). And my problem is that I don't really have some good arguments

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, 1994
No 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=20111696
where 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:

perl -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}'
where it excels compared to languages

  • Perl can't be beat on the command line for speed of writing and sheer power of one-liners.

  • Then pasting one-liners into files for further development into complete programs.
    #!/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 }
  • Then abstracting the mojo out of the programs into modules to reuse the code.

  • Then back to one-liners, using your new modules, to repeat the cycle of virtues.

    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

    Title:
    Use:  <p> text here (a paragraph) </p>
    and:  <code> code here </code>
    to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.