Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: command line perl reading from STDIN

by talexb (Canon)
on Jan 22, 2013 at 17:56 UTC ( #1014745=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    cat input_file.fq | \
    perl -ne '$s=<>;<>;<>;chomp($s);print length($s)."\n";' > output.txt
    
  2. or download this
    perl -ne '$s=<>;<>;<>;chomp($s);print length($s)."\n";' \
    <input_file.fq >output.txt
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014745]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (14)
As of 2015-07-31 14:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls