Install Perl 5.20 on macOS

Codeforces support perl 5.20 and the perl version on macOS is 5.18. So I want to install perl 5.20 on macOS. There is a installation management toll for perl. It is Perlbrew.

Just follow the homepage of the Perlbrew to install it:

\curl -L https://install.perlbrew.pl | bash

Then install perl 5.20:

perlbrew install perl-5.20.0

Now, I can switch to perl 5.20 easily:

perlbrew switch perl-5.20.0

Reset iTerm2 Preferences to Default

Sometime I mess up my iTerm2 settings and forget where or which configuration I set before. It's annoying to find the exact option I need to reset. It is much easier if I can reset all of the settings to iTerm2's default. So this is the solution:

cd ~/Library/Preferences/
defaults delete com.googlecode.iterm2

ok, all of the settings of iTerm2 is reset. Refer to iTerm2 FAQ. Besides, for more interesting features of iTerm2, please refer to iTerm2 Features.

This is my first blog. Today will be a good Saturday. ;-)