Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Perl Coding Basics: Learn to Script from Scratch
New
Rating: 5.0 out of 5(5 ratings)
5 students

Perl Coding Basics: Learn to Script from Scratch

Master Perl fundamentals — variables, regex, file I/O, and data structures — through hands-on code examples
Last updated 4/2026
English

What you'll learn

  • Write and run Perl scripts using scalar variables, operators, and string interpolation
  • Control program flow with if/elsif/else, unless, while, for, and foreach constructs
  • Store and manipulate ordered data using Perl arrays and built-in array functions
  • Use hashes for fast key-value lookups and iterate over their contents
  • Write reusable subroutines with proper argument handling and lexical scoping
  • Match, extract, and replace text patterns using Perl regular expressions
  • Read from and write to files using filehandles and the open function
  • Handle errors gracefully with die, warn, and eval
  • Build complex nested data structures using references in Perl
  • Leverage core Perl modules to extend your scripts with minimal effort

Course content

5 sections31 lectures6h 10m total length
  • Hello World and Print Statements11:55
    Learn how to use Perl's print and say functions to display text to the screen. Discover how Perl handles string literals, how to include newline characters, and the difference between single-quoted and double-quoted strings when it comes to interpolation.
  • Scalar Variables and Assignment12:38
    Walk through declaring scalar variables with the dollar sign sigil, assigning both string and numeric values, and understanding how Perl treats context to decide whether something is a number or a piece of text.
  • Arithmetic and Numeric Operators13:48
    Covers the standard arithmetic operators in Perl — addition, subtraction, multiplication, division, modulus, and exponentiation. Learn about increment and decrement shorthand operators that make updating counters a breeze.
  • String Operators and Concatenation11:20
    Learn how to use the dot operator for concatenation and the x operator for string repetition in Perl. Explore string comparison operators like eq, ne, lt, and gt, which behave differently from their numeric cousins.
  • String Interpolation and Escape Sequences12:07
    Dive into string interpolation in Perl, showing how to weave variable values into output without clunky concatenation. Explore essential escape sequences like tab, newline, and backslash for fine control over text formatting.
  • User Input with STDIN11:02
    Learn how to read user input from the standard input stream using Perl's angle bracket operator on STDIN. Discover why the chomp function is essential for stripping trailing newlines from input.

Requirements

  • Basic understanding of programming concepts like variables, loops, and functions in any language
  • Comfort using a text editor to write and save code files
  • Access to a computer with Perl installed or a cloud-based coding environment
  • Familiarity with running commands in a terminal or command line

Description

This course contains the use of artificial intelligence.

Perl has powered everything from system administration scripts to bioinformatics pipelines for over three decades, and it remains one of the most practical languages for text processing and rapid automation. Whether you are wrangling log files, parsing data feeds, or automating repetitive tasks, Perl's expressive syntax and legendary regular expression support make it the right tool for the job.

This course walks you through Perl from the very first print statement to building nested data structures and working with files. You will begin with scalar variables, operators, and string interpolation, then move into control flow with conditionals and loops. From there, you will master Perl's powerful aggregate data types — arrays and hashes — learning how to store, sort, slice, and iterate over collections of data. The course then introduces subroutines for code reuse and dives deep into Perl's world-famous regular expressions, covering pattern matching, capture groups, substitutions, and modifiers. Finally, you will learn file input and output, error handling, references for building complex nested structures, and how to leverage Perl's extensive module ecosystem.

This course is designed for beginners who have some basic familiarity with programming concepts but are new to Perl. By the end, you will be able to write clean, idiomatic Perl scripts that read and write files, process text with regular expressions, organize logic into subroutines, and work with multi-dimensional data structures.

What sets this course apart is its relentless focus on practical, runnable code over theory. Every lecture teaches exactly one concept with a clear example, so you are never overwhelmed and always making progress. Hit enroll and start writing Perl that actually does something today.

Who this course is for:

  • Beginners who know another language and want to add Perl to their toolkit
  • System administrators looking to automate tasks with Perl scripting
  • Data analysts who need to process and transform text files efficiently
  • Students or hobbyists curious about one of the most influential scripting languages
  • Developers maintaining or extending legacy Perl codebases who need a solid foundation