in reply to
command line perl reading from STDIN
cat input_file.fq | \
perl -ne '$s=<>;<>;<>;chomp($s);print length($s)."\n";' > output.txt
Just a stylistic note, but this can be restated as the following:
perl -ne '$s=<>;<>;<>;chomp($s);print length($s)."\n";' \
<input_file.fq >output.txt
Unless I'm dumping the contents of a file to the console, I don't use cat that much .. head, tail and less are handier.
Alex / talexb / Toronto
"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds