すみません。
unixのwc -lコマンドと同等のものを
perlやawkの一行野郎にしたいのですがうまくいきません

perl -ne 'while (<>) { print cnt}' file1
お願いします