Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Dealing with nextline of a file

by BillKSmith (Monsignor)
on Jul 28, 2021 at 14:22 UTC ( #11135432=note: print w/replies, xml ) Need Help??


in reply to Dealing with nextline of a file

Any of the "sliding window" approaches will answer your question. However, I suspect that you have an XY Problem. If you describe what you need to count, we may be able to suggest a better algorithm. My best guess is that you want the number of distinct values for the first field in your data. Can you be sure that like values are always consecutive?
Bill

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2021-11-27 12:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?