Perl Tutorial

Code & Transcript Here :

Best Book on Perl :

You can support these videos on Patreon :

02:16 – Intro & Scalars
11:35 – Math
15:40 – Conditionals
23:07 – Looping
28:38 – Strings
35:25 – Arrays
44:30 – Hashes
48:29 – Subroutines
56:00 – File IO
1:00:36 – Object oriented Perl

I cover basically what you would learn in a 250 page book in this one video. We’ll learn all the basics plus pragmas, scalars, arrays, hashes, printf, print, math functions, conditionals, boolean operators, if, elsif, else, unless, ternary operator, looping, for, foreach, while, do while, reading input, given, strings functions, s///, ranges, slice, sort, push, pop, join, subroutines, recursive subroutines, packages, object oriented Perl and so much more.

Thank you to Patreon supports like the following for helping me make this video…

50 thoughts on “Perl Tutorial

  1. Learn in One Videos for Every Programming Language
    Subscribe to Bookmark them:
    C++ :
    Python :
    Java :
    PHP :
    MySQL :
    JavaScript :
    C# :
    HTML5 :
    CSS3 :
    JQuery :
    TypeScript :
    ECMAScript :
    Swift :
    R :
    Haskell :
    Handlebars :
    Bootstrap :
    Rust :
    Matlab :
    Arduino :
    Crystal :
    Emacs :
    Clojure :
    Shell :
    Perl :
    Perl6 :
    Elixir :
    D :
    Fortran :
    LaTeX :
    F# :
    Kotlin :
    Erlang :
    Groovy :
    Scala :
    Lua :
    Ruby :
    Go :
    Objective C :
    Prolog :
    LISP :
    Express :
    Jade :
    Sass :

  2. Please tell me the name of the Editor IDE that you are using to write and execute your Perl code into?? Thanks.
    I am desperately needing to know …. but from the widgets, it seems you are doing it on a Mac?

  3. Hi Derek,

    The OOP part feels slightly confusing. Please correct me if I misunderstood.

    A library contains packages. A package contains classes. Classes are defined in distinct perl modules (.pm files).

    Inheritence is established between 2 classes using "our @ISA = qw(<package-name>::<base-class-name>);" perl statement. @ISA is an implicit array holding the inherited variables and subroutines from the base class. ISA stands for the "is a" relation b/w the sub-class (Lion) and the base-class (Cat)

    bless $self, $class
    associates a reference to the current object with the class (ex: Cat class, in perl module)

    use Animal::Cat;
    import Cat class into a standalone perl program (
    and import into the subclass Lion (in

    package Animal::Cat;
    declare that Cat class in belongs to Animal package (name of a folder on the filesystem)

    (like in python)
    is a reference to the current object
    Since it is a reference, the infix operator -> is used to dereference the address of the object, so to access and execute the methods

    – Madhukiran

  4. I'm surprised why such a beautiful and simple language like PERL didn't become as popular like python or java or c++!!! Could this be due to no web app development capabilities?

    (may be Perl 6 has, I just glanced at ur perl6-in-1-vid tutorial, and it felt like an altogether different programming lang from perl5).

    – Madhukiran

  5. So there is a filter (grep) and there is a map (directly as "map") in perl. Is there no equivalent perl function/keyword/special-operator* to "reduce" other than using a for loop**?

    *special operator — like $_ | $& | $` | $' | $/ | @_ | $! | $@ | …

    **for-loop :
    # implement "reduce" op
    my @nums = (1..5);
    my $total = 0;
    foreach (@nums) { $total += $_; }

    – Madhukiran

  6. Hi Derek,

    Reply to ur response :
    "Most of my dislikes come from people that don't like fast videos. Since I'm the only person that makes fast tutorials they have plenty of others to pick from"

    my reply :
    Would u like to consider slowing down a lot while talking about some important and tough-to-understand theory parts, while talking about important language constructs, etc… and go superfast while coding, while writing/talking about the obvious stuff, etc❓

    – Madhukiran

  7. I think you could focus more on string processing. I feel that part was too quick for such important part of Perl language. Thanks for the tutorial anyway! 🙂

  8. Actually Insane amount of Information, jam packed in 1 hour. Some parts I had to put the video on 0.75X speed to get all the info. Each line you say is a new learning.
    Thank you!

  9. I know that I am an absolute newbie to this but I thought that at least each new output would be separated somehow with each new command execution?
    It kind of sad that the line numbers on the output aren't there.. Can you put Comments on the output to tell you, that you are doing something new? Thanks for any info!

  10. 54:48 Factorial of zero should be one, not zero. While this may seem like a strange thing, it is actually the most sensible definition: for example, there is one permutation of an empty set.

  11. what is the name of your editor or IDE that you are using inside of the Windows (left) side? Is that part of Strawberry or no?
    It looks like you actually using a MAC and NOT a Windows box there, on the left, judging from the windowing interface widgets
    My own installation of Strawberry Perl does NOT have your nifty editor or IDE and i cannot do that — what you do?
    How are you writing code in one window and running it in another?

  12. at uhhh …… 4:20 lol time mark into the video … lol he uh …. used 2 different kind of quotes in the same kind of statement, on the same OS / version of Perl….. why?

Leave a Reply

Your email address will not be published. Required fields are marked *