in reply to reading 2 lines at a time using perl

Assuming your filehandle is called $fh, then this is quite nice:

use strict; use Data::Dumper; my $count = 0; while (my @both = grep length, ~~<$fh>, ~~<$fh>) { chomp @both; print Dumper \@both; }

It might be even nicer if the grep length weren't necessary, but unfortunately it is.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'