Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by GotToBTru (Prior)
on Nov 11, 2015 at 14:44 UTC ( #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? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2021-10-23 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (88 votes). Check out past polls.

    Notices?