AnatomyOf

Anatomy of a Perl file

example.pl
1#!/usr/bin/perl
2use strict;
3use warnings; # the closest thing Perl has to a seatbelt
4
5my @lines = ("Line noise", "is a feature,", "not a bug.");
6
7foreach my $line (@lines) {
8 print "$line\n"; # interpolated, not concatenated -- we have some dignity
9}
10
11print "TIMTOWTDI: There Is More Than One Way To Do It.\n" unless $ENV{QUIET};
Perl is a highly capable, feature-rich programming language with strong text processing powers, often used for system administration, web development, and network programming.