perl -e '<> for 1..3; print scalar <>' file.txt