Subroutines

Perl Programming Language

Perl is a general purpose, high level interpreted and dynamic programming language. Perl supports both the procedural and Object-Oriented programming. Perl is a lot similar to C syntactically and is easy for the users who have knowledge of C, C++. Since Perl is a lot similar to other widely used languages syntactically, it is easier to code and learn in Perl. Programs can be written in Perl in any of the widely used text editors like Notepad++, gedit, etc.

Table of Content

  • Basics
  • Fundamentals
  • Input and Output
  • Use of print() and say() in Perl
  • Control Flow
  • Decision Making
  • Datatypes
  • Strings
  • Object Oriented Programming in Perl
  • Introduction to OOPs
  • Subroutines
  • Regular Expressions
  • Regular Expressions
  • File Handling
  • File Handling Introduction
  • Context Sensitivity
  • Scalar Context Sensitivity
  • CGI Programming
  • CGI Programming
  • Misc

Similar Reads

Basics

Introduction to Perl Installation and Environment Setup Syntax of a Perl Program Hello World Program in Perl Perl vs C/C++ Perl vs Java Perl vs Python...

Fundamentals

Modes of Writing a Perl Code Boolean Values Operators | Set – 1, Set – 2 Variables Variables and its Types Scope of Variables Modules in Perl Packages in Perl Number and its Types Directories with CRUD operations...

Input and Output

Use of print() and say() in Perl...

Use of print() and say() in Perl

Perl | print operator Use of STDIN for Input...

Control Flow

Decision Making...

Decision Making

Loops Perl given-when Statement Perl goto operator next operator redo operator last in loop...

Datatypes

Data Types Arrays and Lists: Arrays Array Slices Getting the Number of Elements of an Array Reverse an array Sorting of Arrays Useful Array functions Arrays (push, pop, shift, unshift) Implementing a Stack List and its Types List Functions Hash: Introduction to Hash Working of a Hash Hash Operations Sorting a Hash Multidimensional Hashes Hash in Scalar and List Context Useful Hash functions Scalars: Scalars Comparing Scalars scalar keyword...

Strings

Quoted, Interpolated and Escaped Strings Multi-line Strings | Here Document Sorting mixed Strings in Perl String Operators Useful String Operators String functions (length, lc, uc, index, rindex) Useful String functions Automatic String to Number Conversion or Casting Count the frequency of words in text Removing leading and trailing white spaces (trim)...

Object Oriented Programming in Perl

Introduction to OOPs...

Introduction to OOPs

Classes Objects Methods Constructors and Destructors Method Overriding Inheritance Polymorphism Encapsulation...

Subroutines

Subroutines or Functions | Set – 1, Set – 2 Function Signature in Perl Passing Complex Parameters to a Subroutine Mutable and Immutable parameters Multiple Subroutines Use of return() Function References Pass By Reference Recursion in Perl...

Regular Expressions

Regular Expressions...

Regular Expressions

Operators in Regular Expression Regex Character Classes Special Character Classes in Regular Expressions Quantifiers in Regular Expression Backtracking in Regular Expression ‘e’ modifier in Regex ‘ee’ Modifier in Regex pos() function in Regex Regex Cheat Sheet Searching in a File using regex...

File Handling

File Handling Introduction...

File Handling Introduction

Opening and Reading a File Writing to a File Appending to a File Reading a CSV File File Test Operators File Locking Use of Slurp Module Useful File-handling functions...

Context Sensitivity

Scalar Context Sensitivity...

Scalar Context Sensitivity

List Context Sensitivity STDIN in Scalar and List Context...

CGI Programming

CGI Programming...

CGI Programming

File Upload in CGI GET vs POST in CGI...

Misc

Breakpoints of a Debugger Exiting from a Script Creating Excel Files Reading Excel Files Number Guessing Game using Perl Database management using DBI Accessing a Directory using File Globbing Use of Hash bang or Shebang line Useful Math functions...