Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: One-liner only checking the first line of the input file

by GotToBTru (Prior)
on Nov 11, 2015 at 14:44 UTC ( [id://1147458]=note: print w/replies, xml ) Need Help??


in reply to One-liner only checking the first line of the input file

I copied your code and data verbatim and it works for me.

howard$: cat input.txt 77 * 10 0 * * 0 340 141 * 40 0 * * 0 240 howard$: perl -lane 'print "$F[2]\t$F[7]" if $F[7] > 0' < input.txt 10 340 40 240

Environment is AIX, Perl 5.8.8.

Dum Spiro Spero

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-19 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found