example from perlmonks