$ seq 1 6 > lines $ cat lines 1 2 3 4 5 6 $ perl -ne ' > use constant { I => 3, J => 5 }; > print if I .. J;' lines 3 4 5 $