implemented tutorial 20 in perl
first cut of tutorial 21