Perl is a free-format programming language. This means that in general it does not matter how a Perl program is written with regard to indentation and lines.
An exception is when Perl encounters a sharp or pound symbol (
#) in the input: it then discards this symbol and everything following it up to the end of the current input line. This can be used to put comments in Perl programs. Real programmers put lots of useful comments in their programs.
There are places where whitespace does matter: within literal text, patterns, and formats.
If the Perl compiler encounters the special token
__DATA__, it discards this symbol and stops reading input. Anything following this token is ignored by the compiler, but can be read by the program when it is run, using the package filehandle
__END__ behaves like
__DATA__ in the top level script (but not in files loaded with require or do) and leaves the remaining contents of the file accessible via the global filehandle
When Perl is expecting a new statement and encounters a line that starts with
=, it skips all input up to and including a line that starts with
=cut. This is used to embed documentation.