Skip to content

Instantly share code, notes, and snippets.

@nicolasrouanne
Last active July 29, 2020 21:19
Show Gist options
  • Save nicolasrouanne/342852359a7b8db19fa8bafbf2c2736a to your computer and use it in GitHub Desktop.
Save nicolasrouanne/342852359a7b8db19fa8bafbf2c2736a to your computer and use it in GitHub Desktop.
Perl cheatsheet

Pearl cheatsheet

Perl should be installed on Mac OS using Brew

$ brew install perl

If perl is already installed, this will throw an error. You should then install perl with perlbrew. Perlbrew is a versions environment for Perl, such as rbenv for ruby and nvm for node. See a complete guide for perlbrew.

# Installation
curl -L https://install.perlbrew.pl | bash
 
# Initialize
perlbrew init
 
# See what is available
perlbrew available
 
# Install some Perls
perlbrew install 5.18.2
perlbrew install perl-5.8.1
perlbrew install perl-5.19.9
 
# See what were installed
perlbrew list
 
# Swith to an installation and set it as default
perlbrew switch perl-5.18.2
 
# Temporarily use another version only in current shell.
perlbrew use perl-5.8.1
perl -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment