A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Jump to

Quick reference

Showing posts with label binary. Show all posts
Showing posts with label binary. Show all posts

Install perl really fast

Fastest way to install perl:

perlbrew install -j 5 --notest perl-5.16.3

Only takes about 2 mins.

Thanks perlbrew.

When to use "or" and when to use || (double pipe) in Perl

Use || for assigning to a variable:

$a = $b || $c

Use "or" to control program flow:

$a = $b or die 'error: $b is unexpectedly false'

Mnemonic: || is a symbol like variables and numbers are, while "or" and "die" are both english words.

(source, source)