Chapter 3 done

Review please
while ( my $line = pop @input ) {
  ...
}