---
name: "perl"
section: "1"
platform: "macos"
package: "perl"
version: "175"
release: "macOS 26.5"
platforms: ["linux", "openbsd", "macos"]
url: "https://new.carta.tech/perl"
---

# perl(1)

Practical Extraction and Report Language

## NAME

**perl,** **a2p** – Practical Extraction and Report Language

## SYNOPSIS

**perl** ...

**a2p** ...

## DESCRIPTION

To support multiple versions, the program named **perl** now just selects the real version of Perl to run, and the program named **a2p** now just selects the real version of the awk-to-perl translator to run, depending on various settings. The current supported versions are **@VERSION\_DEFAULT@** and **@VERSION\_ALT@**, with the default being **@VERSION\_DEFAULT@** (older alternate versions are provided for backward-compatibility, while newer alternate versions are provided before we are ready to make it the default). Use

```
% man perl@VERSION_DEFAULT@
```

```
% man perl@VERSION_ALT@
```

```
% man a2p@VERSION_DEFAULT@
```

```
% man a2p@VERSION_ALT@
```

to see the man page for a specific version. When the version is unspecified, as in:

```
% man perldoc
```

the man page for the (unmodified) default version of Perl (**@VERSION\_DEFAULT@**) will be shown.

## CHANGING THE DEFAULT PERL VERSION

Using

```
% defaults write com.apple.versioner.perl Version @VERSION_ALT@
```

will make version **@VERSION\_ALT@** the user default when running the both the **perl** and **a2p** commands (**versioner** is the internal name of the version-selection software used).

To set a system-wide default, replace ‘com.apple.versioner.perl’ with ‘/Library/Preferences/com.apple.versioner.perl’ (admin privileges will be required).

The environment variable VERSIONER\_PERL\_VERSION can also be used to set the **perl** and **a2p** version:

% export VERSIONER\_PERL\_VERSION=@VERSION\_ALT@ *#* *Bourne-like* *shells*

     **or**

% setenv VERSIONER\_PERL\_VERSION @VERSION\_ALT@ *#* *C-like* *shells*

```
% perl ...
```

This environment variable takes precedence over the setting in any preference file.

## USING A SPECIFIC VERSION

Rather than using the **perl** command, one can use a specific version directly. For example, running **perl@VERSION\_ALT@** from the command line will run the **@VERSION\_ALT@** version of Perl, independent of what the default version of Perl is.

One can use a specific version of Perl on the *#!* line of a script, but that may have portability and future compatibility issues.

Note that the preference files and environment variable that apply to the **perl** command, do **not** apply when running a specific version of Perl. In particular, running **perl@VERSION\_DEFAULT@** will always default to 64-bit execution (unless one uses the [arch(1)](/arch/1.md) command to specifically select a 32-bit architecture).

## SEE ALSO

perl@VERSION\_DEFAULT@(1), perl@VERSION\_ALT@(1), a2p@VERSION\_DEFAULT@(1), a2p@VERSION\_ALT@(1), [arch(1)](/arch/1.md)
