perl
The Perl 5 language interpreter
TLDR
SYNOPSIS
perl [options] [program] [arguments]
DESCRIPTION
perl is the Perl 5 language interpreter. Perl is a general-purpose programming language originally developed for text manipulation, combining features from C, sed, awk, and shell scripting.The language excels at text processing with powerful built-in regular expression support. It is widely used for system administration, web development, network programming, and data processing. The Comprehensive Perl Archive Network (CPAN) provides a vast repository of reusable modules.
PARAMETERS
PROGRAM
Perl script file to execute.-e CODE
Execute the given code as a one-liner. Multiple -e flags are allowed.-E CODE
Like -e but enables all optional features (say, state, etc.).-n
Wrap code in a while(<>) loop, reading input line by line without printing.-p
Like -n but also prints $_ after each iteration.-i[EXT]
In-place edit files. If extension given, creates backup with that suffix.-a
Turn on autosplit mode (used with -n or -p). Splits each line into @F.-F PATTERN
Specify the split pattern for autosplit mode (default: whitespace).-l
Enable automatic line-ending processing. Strips newlines on input, adds on output.-0[OCTAL]
Specify input record separator as octal value. -0777 slurps entire files.-w
Enable warnings (prefer `use warnings;` in scripts).-W
Enable all warnings unconditionally.-c
Syntax check only; do not execute the program.-MMODULE
Load a module before executing (equivalent to `use MODULE`).-T
Enable taint mode for security. Untrusted data cannot affect the system.-S
Use PATH to find the script. Emulates #! on platforms that don't support it.-d
Run the program under the debugger.-v
Print version and configuration summary.
CAVEATS
Modern Perl scripts should use `use strict;` and `use warnings;` for safer code. The -i flag without an extension modifies files in place with no backup. CPAN modules can be installed with the cpan command.
HISTORY
Perl was created by Larry Wall in 1987 as a practical language for text manipulation and report generation. Perl 5, released in 1994, introduced major features including references, objects, and modules.
