perl -E 'open my $infh, "<", "sample.txt"; while(<$infh>) {$i++} say $i;'