.pl Perl script
Text & source code
| MIME type | application/x-perl |
|---|---|
| Description | Perl script |
| Category | Text & source code |
| Signature (magic bytes) | 0A 3D 68 65 61 64 31 20 4E 41 4D 45 (.=head1 NAME)0A 3D 70 6F 64 (.=pod)42 45 47 49 4E 20 7B (BEGIN {) |
| Based on | application/x-executable, text/plain |
| Other extensions | .al, .perl, .pm, .pod, .t |
Frequently asked questions
What is a .pl file?
A .pl file is a “Perl script” (MIME type application/x-perl).
How do I open a .pl file?
With any text editor – Notepad++, Visual Studio Code, or gedit and vim on Linux. The file contains readable text, possibly source code or configuration.
How can you tell a genuine .pl file?
By the bytes at the start of the file, the signature (magic bytes): 0A 3D 68 65 61 64 31 20 4E 41 4D 45 (.=head1 NAME), 0A 3D 70 6F 64 (.=pod) and 42 45 47 49 4E 20 7B (BEGIN {). On Linux and macOS, file --mime-type example.pl checks the real type regardless of the extension.
Which format is .pl based on?
Technically a .pl file is a subtype of “Executable” (application/x-executable), so programs for that base format can often read it too.
Which MIME type belongs to .pl?
The MIME type is application/x-perl. In the Apache web server: AddType application/x-perl .pl; in nginx: types { application/x-perl pl; }.