Perl in 100 Seconds

Sdílet
Vložit
  • čas přidán 5. 09. 2024

Komentáře • 909

  • @Fuduwahluz
    @Fuduwahluz Před 2 lety +3233

    "It's about writing scripts that no one can read or understand, so they can't fire you" - excerpt from a interview with a pearl developer, Walter Wallis

  • @DesTr069
    @DesTr069 Před 2 lety +3802

    Having “my” and “our” as what determines if a variable is local or global is really funny to me 😅

  • @4.0.4
    @4.0.4 Před 2 lety +2407

    C: write once, compile everywhere.
    Java: write once, run everywhere.
    Perl: write once, read never.

    • @AByteOfPi
      @AByteOfPi Před 2 lety +88

      just wait until you hear about APL

    • @blackzakuya
      @blackzakuya Před 2 lety +17

      Confused every other time.

    • @truthmatters7573
      @truthmatters7573 Před 2 lety +121

      Python: write once, then rewrite it in Rust for blazing fast memory safe performance.
      I do love python, though.

    • @roronoazoro7619
      @roronoazoro7619 Před 2 lety +129

      Correction: Java is write once debug everywhere

    • @Flankymanga
      @Flankymanga Před 2 lety +4

      oh how true this statement is...

  • @williamchamberlain2263
    @williamchamberlain2263 Před 2 lety +224

    Yes, I definitely want a language that has necromancy as a core feature

    • @smithjustinn
      @smithjustinn Před měsícem +2

      Bless being a keyword makes me think Perl is more a Priest build

  • @Kyagara
    @Kyagara Před 2 lety +617

    "What happened in the 80s stays in the 80s, except perl" - Perl poet

    • @hanswoast7
      @hanswoast7 Před 2 lety +4

      Even the terminator could not help it :D

    • @randomrfkov
      @randomrfkov Před 2 lety +2

      Perl devs still use telnet BBS for social media

    • @YourNickIsTaken
      @YourNickIsTaken Před 2 lety

      And mRNS vaccines.

    • @Redcactus5
      @Redcactus5 Před 2 lety

      Like that one SpongeBob meme

    • @vladverified7659
      @vladverified7659 Před rokem +2

      I’ve lived to see a programming-medieval literature crossover joke. I can now die in peace

  • @subrotoxing8214
    @subrotoxing8214 Před 2 lety +379

    So grateful for these 100secs series... just what i needed 20 years ago :(

    • @StfuSiriusly
      @StfuSiriusly Před 2 lety +10

      why? these videos are great but just show a very short over view. how would that have helped you 20 years ago?

    • @jaysonmichael2468
      @jaysonmichael2468 Před 2 lety

      @@StfuSiriusly maybe because he need an introduction to programming language to understand the language more easily.

    • @Aragorn450
      @Aragorn450 Před 2 lety +16

      @@StfuSiriusly Because we were programming in Perl, PHP, C++, JavaScript, etc, 20 years ago. So it'd have been nice to get these quick overviews of languages and their plus/minus back then instead of now after we've learned it all ourselves.

    • @subrotoxing8214
      @subrotoxing8214 Před 2 lety +3

      @@StfuSiriusly someone told me perl was his favorite ... and i did not bother asking why ... because i knew i would be more confused hearing his explanation. a picture is a thousands word. had this video been available back then might convince me to bite the bullet and learnt perl ^^

  • @camstuart
    @camstuart Před 2 lety +161

    These x in 100 seconds series are really cool. One thing with Perl (have spent most of my career writing perl, but no longer) When accessing an element in an array or a hash, we use "scalar context" eg: my @items = (1,2,3); print "first item is: $items[0]
    "; Raku on the other hand uses the same sigil in all situations, so print "first item is: @items[0]
    "; would be correct

    • @TheLostBijou
      @TheLostBijou Před 2 lety

      I would have to favor Raku there. you can also represent scalar numbers readably, such as 1_000_000. It has many, many special features, but like everything that is powerful, it can be misused.

    • @JohnHughesChampigny
      @JohnHughesChampigny Před 2 lety +4

      @@TheLostBijou "you can also represent scalar numbers readably, such as 1_000_000" As you can in Perl.

    • @piotao
      @piotao Před 2 lety +2

      exactly, and this scalars with $ are 'perl way' as it always was! Is raku worth to learn at all, when we have Perl?

    • @TheLostBijou
      @TheLostBijou Před 2 lety +2

      Pio, from what little I know, yes. Especially if you are doing anything with language grammars. I haven't checked in on the language in a while, though.

    • @CraigCall
      @CraigCall Před 2 lety +2

      I was about to make the same comment. I do prefer the Raku way of doing things personally and actually really like Raku as a language

  • @mobeen360
    @mobeen360 Před 2 lety +135

    I accidently discoverd it when i was in my vscode making a new python file but instead of typing .py extension I typed .pl which displayed a little camel icon and then I googled "programming language with camel icon". That's how I found it lol😂

  • @djcaesar9114
    @djcaesar9114 Před 2 lety +131

    One of the most underrated languages. It saved me several times for big projects when it involved dealing with huge amount of data.

    • @_modiX
      @_modiX Před rokem +3

      could you elaborate? Why was perl the best choice? Weren't there better alternatives?

    • @djcaesar9114
      @djcaesar9114 Před rokem +23

      @@_modiX I had to develop a new major application with modern technologies to replace 2 old COBOL apps. I had to convert data handled by these two apps (a huge amount of more or less structured data) so that they would fit in my new PostgreSQL database.
      I wrote several scripts in several languages to treat every line of old data, applying a lot of tests and transformations, to get lines that could be injected in a correct PG database with good indexes, primary and foreign keys, etc.
      PERL was by far the fastest and most reliable.

    • @_modiX
      @_modiX Před rokem +9

      @@djcaesar9114 That's a great observation. I will keep that in mind for my future works. Thank you for your response.

    • @djcaesar9114
      @djcaesar9114 Před rokem +2

      @@_modiX you're welcome, if my experience could help fellow developers, it's great! :)

    • @Demosai
      @Demosai Před rokem +1

      Same same!

  • @pm71241
    @pm71241 Před 2 lety +65

    Hmm... former long time Perl programmer here ...
    I somehow doubt that Perl's main usage nowadays is CGI scripts. ... that time has passed.
    It is used a lot for sysadm scripts and what it's backcronym says: "Practical Extraction and Reporting Language".
    It's very useful for quickly processing some input to some output when bash/sed/awk are too cumbersome. - which was kind of it's original purpose.

    • @bluesquare23
      @bluesquare23 Před 2 lety +3

      Still lots of perl cgi based websites hosted at Pair Networks!

    • @robbrown2789
      @robbrown2789 Před 2 lety +3

      Maybe moved to FastCGI or other protocols in more persistent environments, but still plenty of (new) websites/platforms being built in it. Things To Get Me is one of mine.

    • @CARPB147
      @CARPB147 Před 11 měsíci

      @@bluesquare23 Websites written in Perl don't have to be CGI. Preferable to use a framework like Catalyst (MVC pattern) with the Template Toolkit, or Mojolicious, or Dancer2.

  • @andresgz
    @andresgz Před 2 lety +162

    Please "use strict;" and "use warnings;" to make your code less error-prone

    • @RagHelen
      @RagHelen Před 2 lety

      Shut up, buzzkill.

    • @bit2shift
      @bit2shift Před 2 lety +7

      Don't forget `use English qw{-no_match_vars};` 😉

    • @andresgz
      @andresgz Před 2 lety +10

      @@bit2shift Just adding that the '-no_match_vars' avoided regex performance penalty in perl 5.18 and earlier.
      This was fixed in perl 5.20 so you can just "use English;" since then.

    • @scoreunder
      @scoreunder Před 2 lety +3

      tacking onto that, if you declare a variable, go with `my` by default rather than assigning it out of nowhere

    • @kindlin
      @kindlin Před rokem

      @@andresgz
      Wait, that's real code?
      I need to be running from this syntactic nightmare.

  • @NNNedlog
    @NNNedlog Před 2 lety +54

    The "my" and "our" keywords is really amazing. Makes it easier to understand even if it's the first time hearing of this language

    • @Fooney1
      @Fooney1 Před rokem

      I like VOID. Oh wait its dumb as hell

  • @apexphp
    @apexphp Před 2 lety +82

    Perl, my first love in the programming language. After 17 years, I even find myself using it daily these days. Converting and refactoring a bunch of Perl and Python scripts over to Rust atm. Good stuff.

    • @theroboman727
      @theroboman727 Před 2 lety +10

      hearing rust always makes me happy lol. I love rust and this is my first time learning anything about perl and seems very interesting, but also way too complex for practical apps

    • @apexphp
      @apexphp Před 2 lety +7

      @@theroboman727 ehh, Perl is all but dead, which is how I got this contract. A biologist showed up in my inbox one day excitedly saying, "hey, I see Perl on your resume! I can't find anyone who knows this language, and I'm doing some cool DNA analysis work, can you help?". I obliged, then proceeded to convince him if processing time is of utmost importance, we really need to be on Rust, so off to the races with Rust we go. And yeah, love Rust as well.

    • @user-rd3jw7pv7i
      @user-rd3jw7pv7i Před 2 lety +9

      @@theroboman727 Rust's guidebook is basically the main reason why I fell in love with it. It feels like a friend guiding you to use a tool they create rather than a textbook telling you syntaxes and what not.

    • @Javier-ov3hj
      @Javier-ov3hj Před 2 lety

      @Apex and PHP Do you have any recommendations for learning perl or more specifically for converting perl to python?

    • @JustBCWi
      @JustBCWi Před 2 lety

      I gave up Perl for Ruby when Perl 6 was trying to come along. I build a major system in Perl, over 250K SLOC.

  • @leoaso6984
    @leoaso6984 Před 2 lety +783

    The Perl language was so terse and minimal that the programming community rebelled by adopting Java.

    • @aziskgarion378
      @aziskgarion378 Před 2 lety +57

      Yeah sure it was the programming community? And not the business managers who thought Java was the next hot thing and hired developers to write in that verbose monstrosity?

    • @masterflitzer
      @masterflitzer Před 2 lety +47

      @@aziskgarion378 Perl is still just a scripting language, writing big scale apps with it would be worse than with Java

    • @ellisgl
      @ellisgl Před 2 lety +11

      When PHP 4 came out, I learned that and forgot Perl.

    • @StefanReich
      @StefanReich Před 2 lety +12

      Yeah, Java's syntax is not the best that ever was. It's the JVM that makes the difference and it's the reason that Java is so successful. The JVM is just a fantastic engine that delivers on its promises.

    • @JustBCWi
      @JustBCWi Před 2 lety +8

      A comment that clearly does not understand the difference between a scripting language and a systems language. Java adoption was a rebellion against C++. Python & Ruby adoption was a rebellion against Perl. ;)
      The Perl core had not gone after Perl 6, and instead addressed some complaints by the community, then perhaps Perl would still be in the top 10. :shrug:

  • @bayrock1337
    @bayrock1337 Před 2 lety +28

    I've been looking forward to this one! Can we see Lisp and/or Clojure next maybe?

  • @bouncypeople8749
    @bouncypeople8749 Před rokem +27

    I don’t know why, but this language connects with me on a deeper level. I love the fact that Perl isn’t like every other programming language. It’s uniqueness is what makes it so beautiful. Graciously powerful.

    • @games4us132
      @games4us132 Před rokem +2

      If you're unique doesn't mean that you're useful

    • @hansdegroot652
      @hansdegroot652 Před rokem +1

      Just love how there are often many ways to do the same

    • @JamesSmith-ix5jd
      @JamesSmith-ix5jd Před 10 měsíci +1

      I started my programming journey with Linux - Bash, awk, grep, regex, little bit of C, so Perl just clicks for me, but I guess it depends on your background.

    • @bouncypeople8749
      @bouncypeople8749 Před 8 měsíci

      @@games4us132I guess you are not a sysadmin 😂

    • @bouncypeople8749
      @bouncypeople8749 Před 8 měsíci

      @@hansdegroot652So many ways to accomplish the same goal.

  • @collinthomas6288
    @collinthomas6288 Před 2 lety +18

    It's been ten years since I've used Perl, but this video made me miss it. Great language

    • @k1lldash9
      @k1lldash9 Před rokem

      Same!
      I like honestly how things can get convoluted, but simple once you know it
      my $cin = ;
      vs
      my $cin = ;
      less to type and achieves the same thing

  • @esc120
    @esc120 Před 2 lety +99

    1:33 array element should be accessed by $nums[1] and hash element should be accessed by $friends{'Larry'}.
    @nums[1] is an array slice with one element and @friends{'Larry'} is a hash slice with one element and %friends{'Larry'} is a hash slice with one key-value pair.

    • @dexterbt1
      @dexterbt1 Před 2 lety +9

      Jumped here to comment on this also. A 'use strict' pragma might flag this compile time.

    • @DominicArkwright
      @DominicArkwright Před 2 lety +2

      Also came here to say this ;)

    • @pjmmccann
      @pjmmccann Před 2 lety +3

      Yep: it's a head-scratcher for every perl noob

    • @MattOatesUK
      @MattOatesUK Před 2 lety +1

      This needs pinning

    • @eritain
      @eritain Před 2 lety +2

      The sigil was wrongly omitted from the first `print` example too.

  • @amitk.512
    @amitk.512 Před 2 lety +55

    Variable scoping with 'my' and 'our' keyword was pretty cool.

  • @kuma9239
    @kuma9239 Před 2 lety +5

    The "my", "our" and "unless" are good ideas. You don't need to know them, but the moment you put your eyes on them you know what they mean.

  • @pirate21
    @pirate21 Před 2 lety +36

    Long time perl user - no other language comes close to the regex power of perl.

    • @xoell388
      @xoell388 Před rokem

      Raku?

    • @pirate21
      @pirate21 Před rokem +4

      @@xoell388 Ha, I can’t move off regular Perl after 25+ years. Something about “teaching an old dog” ….

    • @xoell388
      @xoell388 Před rokem +1

      @@pirate21 I am keen to learn perl whatever people say

    • @pirate21
      @pirate21 Před rokem +2

      @@xoell388 sure, go for it. The best place to start is with the O’Reilly “ programming Perl” book.

    • @CARPB147
      @CARPB147 Před 11 měsíci

      @@xoell388 Good for you. Ultra useful.

  • @gerardgauthier4876
    @gerardgauthier4876 Před 2 lety +9

    Perl in 100 secs... Where's the references? Where's the modules and packages? Love Perl, the most underrated and misunderstood language.

  • @krtirtho
    @krtirtho Před 2 lety +507

    Imagine perl developers fighting over if a variable should be "my" or "our"
    Declaring global variables with the keyword *"our"* is the most Russian thing I've ever seen

    • @papajohnsuk5965
      @papajohnsuk5965 Před 2 lety +17

      knew i would find this comment

    • @victorpinasarnault9135
      @victorpinasarnault9135 Před 2 lety +5

      Our variable kkkkkkkkkkk

    • @ummuser
      @ummuser Před 2 lety +10

      I'm a perl developer, nobody uses our. Having variables in a global scope gets messy.

    • @juanmacias5922
      @juanmacias5922 Před 2 lety +4

      Soviet*

    • @youkofoxy
      @youkofoxy Před 2 lety +12

      actually is USSR.
      current Russia is pretty much a "my" country.

  • @JuuzouRCS
    @JuuzouRCS Před 2 lety +8

    Now, this looks so much better, comprehensive and far more entertaining than my 4-man 15 mins presentation on "Perl" back in my first year of college...
    Cool stuff!

  • @IngwiePhoenix
    @IngwiePhoenix Před 2 lety +175

    RegEx still breaks my braincells but man do I ever love Perl's syntax. I dont know what it is, but it just feels so well thought out. I learned a tiny bit of Perl when I read that PHP was influenced by it, and I immediately saw why and what. But I have not heared of Raku, gonna give it a look!

    • @b.wallet5295
      @b.wallet5295 Před 2 lety +15

      You better don't..

    • @ipodtouch470
      @ipodtouch470 Před 2 lety +22

      I don’t know how regex works underneath the hood but man after learning it has saved me so much time when parsing strings.

    • @HandcartRule46
      @HandcartRule46 Před 2 lety +10

      RegEx is pretty easy, but you do need the proper resources to learn it.

    • @ali-om4uv
      @ali-om4uv Před 2 lety +1

      @@HandcartRule46 any tips?

    • @II-ii2um
      @II-ii2um Před 2 lety +3

      @@HandcartRule46 yes, pls enlighten us mere mortals good sir

  • @abh1yan
    @abh1yan Před 2 lety +85

    Never knew Perl is this useful, I'll definitely have a look.

    • @bobDotJS
      @bobDotJS Před 2 lety +15

      I really don't think it's worthwhile. I think that if you didn't realize it was useful, you probably aren't in a position where it will change your workflow.
      Maybe if you're writing crazy BASH scripts that are pushing the limits of the language, then you'd probably still choose something like Go long before it makes sense to use Perl.

    • @bryanwong1766
      @bryanwong1766 Před 2 lety +14

      @@bobDotJS Perl has the advantage of being self-included in Linux and MacOS - so if you just want to get things done and bash isn't good enough, Perl is indeed a good solution.

    • @Jebusankel
      @Jebusankel Před 2 lety +8

      Check out Raku instead. It fixes so many warts in Perl and has lots of amazing farsighted features.

    • @milankoncsik9546
      @milankoncsik9546 Před 2 lety +3

      For one liners or short scripts it's decent, but as soon you work on something relatively complex it gets really messy.

    • @abh1yan
      @abh1yan Před 2 lety +2

      @@milankoncsik9546 Yeah I'll better write assembly or maybe binary in case..

  • @andrewmanninen1244
    @andrewmanninen1244 Před 2 lety +43

    It hurts to see the absence of "use strict;" at the top of the file.

    • @kalleguld
      @kalleguld Před 2 lety +2

      What is this, a crossover episode?

    • @HammerTime281
      @HammerTime281 Před 2 lety +12

      And maybe a "use warnings" if you're feeling frisky

    • @DominicArkwright
      @DominicArkwright Před 2 lety +5

      If he did that, none of the other errors would work… ;)

  • @SebastianWeinberg
    @SebastianWeinberg Před 8 měsíci +1

    I have forgotten everything I ever learned about Perl, years ago, _except_ that it was the biggest collection of hacks and dirty tricks I'd ever seen, and I loved it!

  • @geoafrikana
    @geoafrikana Před 2 lety +43

    Perl: I'm the swiss army chainsaw of the internet.
    Python: There should be one- and preferably only one -obvious way to do it.

    • @dexterbt1
      @dexterbt1 Před 2 lety +14

      In Perl, its TIMTOWDI actually, "there is more than one way to do it". Quite the opposite of the guidelines in the zen of python

    • @factChecker01
      @factChecker01 Před 2 lety +7

      And Python's "one way" will change in the next release, but it will be even more perfect and final than the prior way. (sarcasm)

    • @CARPB147
      @CARPB147 Před 11 měsíci +1

      Apparently Python can't add:
      python -c "print('=',0.6+0.7)"
      = 1.2999999999999998 ❌(ouch!)
      ... whereas:
      perl -e "say('=',0.6+0.7)"
      =1.3 ✅

  • @derjansan9564
    @derjansan9564 Před 2 lety +5

    "Swiss army chainsaw" alone made it worth watching.

  • @bluesquare23
    @bluesquare23 Před 2 lety +6

    The great thing about perl is that it's easy to write, fast, and remarkably useful. Larry Wall and his descendants did a great job!

  • @markslima1557
    @markslima1557 Před 2 lety +3

    wow this kind of blew me away. now i must learn perl.

    • @CARPB147
      @CARPB147 Před 11 měsíci

      Learning curve is *not* steep. It is shallow enough to get you writing simple scripts in a few minutes, but the learning curve can be somewhat long depending on how deep you have to go into the bushes to explore and use the many features and power it offers. And to use it *properly* so it avoids the points that people criticize it for.

  • @misterlinuxfriendly947
    @misterlinuxfriendly947 Před 2 lety +8

    I will list Perl on my resumé in the skills section as opposed to listing "Masochism" in the hobbies section, because, fittingly, that is more terse.

    • @CARPB147
      @CARPB147 Před 11 měsíci

      Terse and compact code scare you? You should get a load of APL.

  • @luizvaz
    @luizvaz Před 2 lety +15

    In 2003 I was working to a telecom. There was one job that took 72 hours to complete. They put me on charge to optimize it. I was learning PERL, so I decided to give a try. It was already installed by default on HPUX. After all, the same job spent only 6 hours.
    In the end, they took a look in the code and said: "What the heck you used to write the script?"
    And they asked me to rewrite in ANSI C, because no one was able to understand it. 😂😂😂

  • @kevinbatdorf
    @kevinbatdorf Před 2 lety +18

    “Things that are different should look different”

    • @eritain
      @eritain Před 2 lety

      There is a conceptual elegance to, say, Lisp, where no matter how different things are, they all look the same. But I tend to agree with Larry that in practice, that turned into "oatmeal with fingernail clippings."

  • @ambots13
    @ambots13 Před 2 lety +3

    this channel is the best-place to window shop tech stuff

  • @philippefutureboy7348
    @philippefutureboy7348 Před 2 lety +21

    This syntax sounds like a maintenance horror story :D
    Glad you included zombies, it's very on topic 😂

    • @pramod7426
      @pramod7426 Před 2 lety +2

      You are absolutely correct worked on perl once, never again. It's OOPS is beyond horror

    • @valerie4275
      @valerie4275 Před 2 lety +1

      @@pramod7426 why do you think it's called oops?

  • @Steve-i5295
    @Steve-i5295 Před 2 měsíci

    I like the fact I can write code in Perl without worrying about white spaces and having to use an auto fill gui code editor that shares all my stuff with big data if I am not careful. Most of the core features you will ever need on a web server are built in, you have to import hardly anything.
    The Active State community is where people were nudged if you did not take the time to get a grip on all the concepts.
    This was written as a possible replacement for C, and it was so well done it largely has not changed in quite a long time.
    Hats off to Larry. Learn this and you will stop chasing frameworks such as JQuery (horrors?).
    CSS another language people complain about, there are no short cuts to writing code and testing it.
    You got to pick up an instrument and play it to confirm you learned anything.
    A lot people never will, then later lament why the properietary multi megabyte or gigabyte database layer sitting on top of everything is so expensive?
    Word.

  • @nickxidis9571
    @nickxidis9571 Před 2 lety +8

    Probably learned more about programming from Perl than any other language. That means that Perl is cool and I’m really old. ;)

  • @chloedelaware2922
    @chloedelaware2922 Před 2 lety +7

    kinda wild this fireship guy managed to convince everyone 2 and a half minutes is 100 seconds

  • @JohnHughesChampigny
    @JohnHughesChampigny Před 2 lety +3

    First major error at 1:26. Access of an array element is $nums[1] (dollar because the RESULT is a scalar). Similarly to access a field of a hash its $friends{Larry} not %friends{Larry}

    • @divinecomedian2
      @divinecomedian2 Před 2 lety

      shows how confusing the language is

    • @JohnHughesChampigny
      @JohnHughesChampigny Před 2 lety

      @@divinecomedian2 What is this: "$a" -- answer it's a scalar, because it starts with a "$". What is this: "$b[20]" -- answer: it's a scalar, because it starts with an @. It's also one element of an array. What is this: "@b[20]" -- answer: it's an array, because it starts with an @. It happens to be a slice of the array @b that only contains the 20th element of @b.
      Perl6's "@b[20] is a scalar that is the 20th element of @b" is the confusing thing.

    • @CARPB147
      @CARPB147 Před 11 měsíci

      @@divinecomedian2 "Confusing" as opposed to what?? How about this gem 👇
      Apparently Python can't add:
      python -c "print('=',0.6+0.7)"
      = 1.2999999999999998 ❌(ouch!)
      ... whereas:
      perl -e "say('=',0.6+0.7)"
      =1.3 ✅

  • @cypher5419
    @cypher5419 Před 2 lety +55

    *If human beings evolved new organs as frequently as they do Javascript frameworks, you can bet the doctors would be Googling it too.*

  • @themesong5477
    @themesong5477 Před 2 lety +13

    We can all agree that Fireship is the best programing youtuber. And he changed many lives by explaining lots of stuff. And a discord server where all thes people who value Fireship's clean explanations to join amd help each other!

  • @saidbakr
    @saidbakr Před 2 lety +5

    The matter of marketing. This is the great issue with Perl indeed.

  • @pm71241
    @pm71241 Před 2 lety +21

    1:33 ... sigil errors. Unlike other languages with sigils, in Perl they do not follow the type of the variable, but the type of the expression.
    So it's no @nums[1] or %friends{'Larry'} ... it's $num[1] and $friends{'Larry'}

    • @CARPB147
      @CARPB147 Před 11 měsíci

      That is because $friends{'Larry'} is a *scalar* variable, and not an aggregate set like an array or hash (dictionary). Same with $num[1].

  • @SleepingInsomniac19
    @SleepingInsomniac19 Před 2 lety +5

    “Rej-ex”, ah yes a Rejular expression... just like a jraphical image format

  • @atlantaguitar9689
    @atlantaguitar9689 Před rokem +2

    I wrote a ton of Perl code in the late 90s into the early 2000s. I used it on web sites, in system administration, and in bioinformatics projects.

  • @Shdnfncidjen
    @Shdnfncidjen Před 2 lety +3

    Perl programmer here. Interpreted is a bit of a misnomer... Perl is commonly known as an interpreted language, but this is not strictly true. Since the interpreter actually does convert the program into byte code before executing it, it is sometimes called an interpreter/compiler, if anything at all.

  • @MaxCarponera
    @MaxCarponera Před 2 lety +2

    I implemented a whole P2P network for a customer in perl. Don't regret any second.

  • @tanmay______
    @tanmay______ Před 2 lety +31

    I needed something other than python for string manipulation, this is great!

    • @bg-sj9tx
      @bg-sj9tx Před 2 lety +7

      Why? Python gets the job done

    • @user-he4ef9br7z
      @user-he4ef9br7z Před 2 lety +2

      @@bg-sj9tx Python is slow, heavy and gay.

    • @flybackrs
      @flybackrs Před 2 lety +2

      Python sucks for string parsing. Perl is a lot easier with regexes being first-class citizens, sane string interpolation, useful operators like defined-or, and stuff like that.

    • @kindlin
      @kindlin Před rokem

      @@flybackrs
      I kept hearing _regex_ thrown around and finally googled it. _What the fuck!_ I have almost no idea how I would begin to parse that. It literally looks like you facerolled around the keyboard or something. And these are.... useful? I... take it?

    • @CARPB147
      @CARPB147 Před 11 měsíci

      @@kindlin Just so you know, regular expressions were not invented by Perl. They are essential finite state automata used for text pattern matching. The UNIX/Linux/MacOS command *"grep"* stands for "general regular expression parser," a *basic tool* of UNIX programming. Perl just advanced the state-of-the-art of regexes. Python, Java and others based their own regex implementations on PCRE, and you should know that stands for "Perl-Compatible Regular Expression." YES, they are *hugely* useful and I couldn't even begin to tell you in a comment how much so they are. They are even used in text editors to find data in a file, that's how much they are used. So learn before you jump to judgement on something you don't know or understand.

  • @mrreese2342
    @mrreese2342 Před 2 lety +2

    Looks like a good language, maybe i'll add it to my summer classes in the college that i've created in my room

  • @thatsalot3577
    @thatsalot3577 Před 2 lety +3

    I honestly think 'my' and 'our' sound cooler than public and private.

    • @Birb-
      @Birb- Před 2 lety

      our $program;
      ussr anthem

  • @benhuyck9797
    @benhuyck9797 Před 2 lety +2

    Perl is likely the most powerful tool in my toolbox.

  • @mbbxx
    @mbbxx Před 2 lety +16

    Perl is the original "Write once, read never again" language

  • @laughingvampire7555
    @laughingvampire7555 Před rokem +1

    one great feature you didn't mentioned and probably because is an obscure one, is that when you read any data that is not local, like data from the web, Perl throws always an error if you try to use it without parsing it with regex. Perl forces you to parse input with a regex, Perl called this "tainted variable" so to untaint it you use the regex, and this made sites written in Perl a lot more secure than with PHP, and for many people this was one of the reasons to make fun of PHP. The problem is that noobs still wouldn't know what to look for with the regex, but it helped them to find the documentation to avoid sql injections.

  • @tjwestbrk
    @tjwestbrk Před 2 lety +6

    Crazy how a coworker of mine recently retired and left us with a 1700 line Perl script that I've been dreading modernizing into PowerShell. Thanks for the syntax help, love your videos and consistently well-timed tips!

    • @davidrodenkirchen4666
      @davidrodenkirchen4666 Před 2 lety +16

      Modernize... to PS? Out of the frying pan and into the fire I guess :D

    • @jef777
      @jef777 Před 2 lety +1

      PS. It's so ugly. I love it.

    • @tjwestbrk
      @tjwestbrk Před 2 lety +1

      @@davidrodenkirchen4666 Yup, that's the contemporary pace of an insurance company these days xD

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 Před 2 lety +6

      “Modernizing” and “PowerShell” in the same sentence ... 🤣🤮

    • @mohamedtrfnx6632
      @mohamedtrfnx6632 Před 2 lety +3

      PS? Modernizing?? LMAO

  • @neddev2990
    @neddev2990 Před 2 lety +2

    Nice video, it's great to see perl being explored and described concisely by popular content creators here on youtube. I made a similar video to this a month or two ago... yours is a LOT better ;)

  • @akshattamrakar9071
    @akshattamrakar9071 Před 2 lety +6

    my/our made more sense to me then anything else I've ever used like var, let, global

  • @dukemagus
    @dukemagus Před 2 lety +4

    "Closer to human language" he said...

  • @_zetrax
    @_zetrax Před 2 lety +3

    I used it once to parse webpages, It is actually cool

  • @Nawamumbwe
    @Nawamumbwe Před 2 lety +7

    As someone who is transitioning to an intermediate dev, it's so awesome being able to follow along with content like this and pick stuff up and process it while listening along and not pausing the whole time to digest some technical concept.
    I think I can add Perl to my CV now.

  • @heckyes
    @heckyes Před 2 lety +3

    This is like PHP's old war veteran Grand Father.

  • @ozzyogkush
    @ozzyogkush Před rokem +1

    I'm having flashbacks of that time I decided to use Perl to do my assignments in a CS low level graphics course (early 2000s). Definitely the wrong tool for the job, but looking back I think what held it back more was a lack of understanding good structure. Still, Perl/CGI is what got me into programming during high school, so it'll always hold a place in my heart. I just hope never to have to use it ever again.

    • @CARPB147
      @CARPB147 Před 11 měsíci

      Misplaced hope. Perl is hugely useful for anyone outgrowing shell scripts and the simplest of AWK scripts.

  • @atalocke
    @atalocke Před 2 lety +9

    Obviously we need a 100s for Raku. I had some other ideas recently for 100s. Free for you to use of course.
    * Clojure
    * Crystal
    * Scala
    And then maybe you could move on to build tools like make, basil, and Groovy? 👀

  • @JThompson_VI
    @JThompson_VI Před 2 lety +4

    You've finally made it, it's time for APL in 100 seconds.

  • @Nikhil-Tomar
    @Nikhil-Tomar Před 2 lety +4

    Looking at perl now, I might give it a go it didn't seem like java at all and that is good.

  • @afganitia
    @afganitia Před 2 lety +1

    Love the camel!
    Pd: Next fortran please!

  • @josefmuller86
    @josefmuller86 Před 2 lety +7

    Perl gets the job done, but nobody knows why

    • @CARPB147
      @CARPB147 Před 11 měsíci

      Only the woefully uninformed don't.

  • @robmyers8948
    @robmyers8948 Před 3 měsíci +1

    I’ve been developing in Perl for 28 years, but switched to python to make it more appeasing for the team. Still using it for some applications but have to explain why we are using this obsolete language.

  • @microcontrolledbot
    @microcontrolledbot Před 2 lety +3

    Gawd I wish the =~ operator was in JS and worked the same way as it does in Perl

  • @JackDespero
    @JackDespero Před 2 měsíci +1

    The funniest part about Perl is that I have always associated it with the Camel.
    And a couple of months ago I learnt that the actual mascot is an onion.
    The camel is just from the O Relly book.

  • @christophhofer303
    @christophhofer303 Před 2 lety +4

    Do Prolog next!!

  • @laughingvampire7555
    @laughingvampire7555 Před rokem +1

    I love perl, is one of the reasons I chose ruby over python back in 2004 because the ruby man page says "inspired by lisp and perl" and that was a selling point to me.

  • @asdf8asdf8asdf8asdf
    @asdf8asdf8asdf8asdf Před 2 lety +4

    Love PERL.
    But, hey, I respect and like APL too.

  • @renecabuhan1675
    @renecabuhan1675 Před 2 lety +1

    it is actually good naming convention for variables ❤.

  • @spwisp6300
    @spwisp6300 Před 2 lety +5

    Google App Script in 100 seconds?

  • @Suraj-tz3oq
    @Suraj-tz3oq Před 2 lety +2

    Man you are great.. want a full length tutorial

  • @chucksucks8640
    @chucksucks8640 Před 2 lety +9

    I messed perl back when cgi was a new thing in web pages and I found it very comfortable to use. I didn't even know what most of the keywords did but I could read them well enough to hack a few of my own scripts out. It was perfect for cgi scripts.

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 Před 2 lety

      Similar here, I guess. My main reference was the man pages (just type “man -s1 -k perl” to see how many there are). But I was never entirely sure I understood the implications of some of the language features I was using.
      Then I discovered Python. That had a much cleaner syntax, and all the language features actually made sense. So I switched, and pretty much stopped using Perl.

    • @leoingson
      @leoingson Před 2 lety

      @@lawrencedoliveiro9104 Same here - Perl seemed pretty awful in comparison. Except the perfect regex.

  • @danieljacobs446
    @danieljacobs446 Před 2 lety +3

    Mainly used for CGI: Yup, the vast majority of websites I maintain at my job use HTML::Mason with Perl. I'm trying to write newer websites using more modern languages though.

    • @JBBell
      @JBBell Před 2 lety +2

      Jesus, do the pages show their age using radio-carbon dating?
      I kid. I remember HTML::Mason from the early aughts but that’s millenia ago in technology development years. I saved a couple businesses a lot of money using Perl to double-check credit card transaction records. I’ve forgotten a lot since getting into Python.

    • @ShawnThuris
      @ShawnThuris Před 2 lety

      I work on one of those myself. The thing is, if you have a massive number of pages and need to do HTML templating, and the templating/component system works and is fast, it doesn't really matter how old it is. The template engine doesn't care what html, css and js you're putting out, and if your whole setup is tuned well users will have no idea it was written before git existed.

  • @hansdegroot652
    @hansdegroot652 Před rokem +1

    Even after all these years still love unless

  • @UliTroyo
    @UliTroyo Před 2 lety +3

    Perl is def a blind spot in my knowledge bank. This is such a great series.

    • @Krypton2658
      @Krypton2658 Před 2 lety

      Same for me except I’m gonna keep it blind

    • @CARPB147
      @CARPB147 Před 11 měsíci

      @@Krypton2658 Yeah, you go for Python which can do marvels like this: 👇
      *python -c "print('=',0.6+0.7)”*
      = 1.2999999999999998 ❌(ouch!)
      ... whereas:
      *perl -e "say('=',0.6+0.7)”*
      =1.3 ✅

  • @kimandre336
    @kimandre336 Před rokem +2

    I remember from a vocational class where I learned Microsoft's Powershell. The instructor ranted about Perl for 10-15 straight minutes. The abridged version of this is
    "Now Powershell has some influences, one of them happens to be a programming language called Perl. Perl was created by a linguist, as in not-a -programmer background kind of computer scientist wannabe, who has some mild obsession with Unix shell commands and a deep obsession with another programming language called AWK. He pretty much merged his interests with C and some other popular languages. So you can see a very tiny influence of Perl in Powershell. The bigger point is that Perl is so unusable for anybody today to the point that its steep learning curve indirectly inspired other programmers to develop more approachable programming languages for the market today. So, thank you, Perl?"

    • @CARPB147
      @CARPB147 Před 11 měsíci

      The instructor you got was obviously an imbecile. My condolences. Perl's learning curve is actually quite shallow! You can write simple scripts within a few minutes. The learning curve, however, is *long* (not "steep"!) depending on how deep you need to go into the bushes for its more elaborate or powerful features. That's the *real* skinny.

  • @raz0229
    @raz0229 Před 2 lety +15

    According to Stack Overflow, Perl is the most paid programming language of 2022

    • @IronTeddyBear
      @IronTeddyBear Před 2 lety +3

      Yes, but Perl jobs are few and far between.

    • @dukemagus
      @dukemagus Před 2 lety

      No wonder. You need to be really good to translate old perl scripts and understand everything they do

    • @neddev2990
      @neddev2990 Před 2 lety +2

      It's actually not too difficult to get a Perl job. The reason they are highly paid is because most people are not looking for perl jobs yet companies have a bunch of legacy perl code. So they need someone to work on it. So once you learn perl you can be fairly confident that you will be able to find a good job :)

    • @CARPB147
      @CARPB147 Před 11 měsíci

      It's all about *supply* and demand. Economics 101. Most people just focus on demand as in "where are most jobs asking for" without considering that abundant jobs like JavaScript or Python also have the most supply of cheap programmers coming from populous countries like India. It's a crowded field out there and competition is intense for those.

  • @random-kc8gx
    @random-kc8gx Před 2 lety +1

    Seems like really handy legible thing to script and code in, here i was dreading it since i started coding 15years back, phew

  • @maythesciencebewithyou
    @maythesciencebewithyou Před 2 lety +3

    The language is good with strings, that's why it was the most popular language with biologists for a time.

    • @RandalLSchwartz
      @RandalLSchwartz Před 2 lety +1

      Yes, the human genome project's technology was directed by Dr Lincoln Stein, having both an MD and CS degree, and preferred Perl for the task.

  • @flippert0
    @flippert0 Před 8 měsíci +1

    I learned programming in earnest with PERL back in 1995/96 (after limited exposure to BASIC on a C64 back in school in the 80s and some toy stuff with Turbo Pascal in the early 90s). I don't think, PERL was the best way to start, but I did some administrative and early Web stuff afterwards. PERL is still unmatched in the 'Q&D one-liner' department. Not sure what lead to its eventual decline: arcane "Sigil" variables? Half-baked OOP? 15+ year development of Raku successor? Probably all of them. And let's not forget that with Python you had a much more beginner-friendly language at the start of the 2000s.

  • @captureimagery
    @captureimagery Před rokem

    Sometimes I need a refresher when programming. This is the channel for that.

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 Před 2 lety +3

    Larry Wall is known for two major accomplishments: he created patch, and he created Perl.
    Of the two, the concepts of patch have spread to permeate the whole of open-source collaborative development. So that will likely live on in some form forever.
    Perl? Maybe not so much.

    • @jdsaravaiya6468
      @jdsaravaiya6468 Před 2 lety +1

      why did i read this with Morgan freeman narration?

  • @AJ23mady
    @AJ23mady Před 2 lety +2

    Since you've done Ruby can you do Rails in 100 seconds next

  • @Shazam999
    @Shazam999 Před rokem +3

    Was the second "internet" programming language I learned. Was disappointed when I found out literally no other languages have reg-ex by default.

  • @swarnadipmitra1095
    @swarnadipmitra1095 Před 9 měsíci +1

    This is quite comprehensive for the non-regex part of Perl, but there’s a lot more to Perl in terms of small, unique, neat features in terms of operators and functions that literally galore Perl. I’d say you’ve covered like 30% of non-regex Perl by just going over the basics of Perl. But literally the heart of Perl is it’s regex which feels like a completely different language almost sand that consists of nearly twice as much material as there is in non-regex Perl. So Perl is one of those languages that just cannot be touched in one video significantly.

  • @mark_larsen
    @mark_larsen Před 2 lety +10

    honestly loved writing scripts in perl. It's only hard to read if you've never used it before

    • @CARPB147
      @CARPB147 Před 11 měsíci

      Bingo. Spot on comment.

  • @JamieBainbridge
    @JamieBainbridge Před rokem +2

    This is actually a better intro to Perl than most Perl books.

  • @arthurmorgan8966
    @arthurmorgan8966 Před 2 lety +6

    I use it daily for one liners to filter and transform text. If it’s more complicated, only then it becomes a full blown Python script.
    You should do Perl for haters video. Like how one person cannot read and understand another one’s Perl scripts.

    • @bit2shift
      @bit2shift Před 2 lety +2

      You know Perl has CPAN for packages, right?

    • @CARPB147
      @CARPB147 Před 11 měsíci +1

      @@bit2shift I doubt he has any clue what that is. Scripts can be written horribly in *ANY* language. The worst perl scripts are usually written by noobs or the brain-dead. Any decent practitioner will write a perl script that can be read and maintained by anyone knowledgeable in the language.

    • @flippert0
      @flippert0 Před 8 měsíci

      Make this: "like how one person cannot read and understand the same person's Perl script after 2 weeks"

    • @CARPB147
      @CARPB147 Před 8 měsíci

      @@flippert0 That is a patently disingenuous statement. I have never had a problem understanding Perl scripts I wrote a decade (and more) ago. It all depends how a person writes a program. Written poorly in *any* language, or written with the express purpose of obfuscation, a program in *any* language can be made unintelligible. In fact, I've made it a purpose to save many perl scripts I've written over time because they serve as useful patterns when similar problems arise. I do that for other languages as well.

  • @lucaspunzengruber
    @lucaspunzengruber Před 2 lety +2

    I started to maintain a 20 year old legacy server side web app written in Perl, which generates web pages by printing html to the standard output. An absolute nightmare

    • @jcoterhals
      @jcoterhals Před 2 lety +5

      Well, in your case perl isn’t the problem. The organization that keeps legacy code running for 20 years is.

    • @CARPB147
      @CARPB147 Před 11 měsíci +1

      @@jcoterhalsThat is correct. Some functions need to be re-factored or modernized a bit at a time.

  • @freedom_aint_free
    @freedom_aint_free Před rokem +6

    Raku is even better than Perl 6, it's like the production ready version at the end of the line of prototypes. I've found difficult to reach a conclusion about Raku thought, just because it has everything and them some to it, it's a really really feature reach language, and although I don't like it in languages e.g. C++, just because the language is always surprising you no matter how long you've been programming in it, Raku seems to have done many many things right.

  • @toomasvendelin
    @toomasvendelin Před rokem +1

    At 1:35, it should be $nums[1], not @nums[1]. @nums is an array, $nums[1] is a scalar.

  • @RandalLSchwartz
    @RandalLSchwartz Před 2 lety +5

    The syntax for accessing elements of arrays and hashes is wrong. Someone didn't read my books..... :)

  • @umgefahren818
    @umgefahren818 Před 2 lety +2

    Languages you could do: Lisp (or it’s dialects), Crystal, AWK and Visual Basic

    • @dukemagus
      @dukemagus Před 2 lety

      Let's pretend visual basic never existed

  • @pupfriend
    @pupfriend Před 2 lety +20

    Little known fact, the guy who invented regex also invented waterboarding.