http://www.perlmonks.org?node_id=1014744


in reply to Re: command line perl reading from STDIN
in thread command line perl reading from STDIN

cat input_file.fq | perl -ne '$s=<>;<>;<>;chomp($s);print length($s)."\n";' > output.txt
Ok, but for the above, if we were to step-by-step describe what is going on. How would it be described? It just that from the above I thought it would assign $s on every line OR skip 2 lines and then assign $s to the third line and repeat.