Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^6: Reading files n lines a time

by naturalsciences (Beadle)
on Dec 07, 2012 at 19:51 UTC ( #1007816=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Reading files n lines a time
in thread Reading files n lines a time

Yes it would break down but right now I'm specifically looking for neighbouring dupes :) (There is an actual reason to suspect they are positioned so in those files) It wouldn't be hard for me to write a push/shift code that would kind of like slide a 4-line long reading frame over the whole text file.

But I ran totally in a ditch trying to do the same so that the frame wouldn't "slide" but would be "lifted" four lines at a time.

Then I could just

<code> if ($frame[1]!=m/$frame[3]/){print @frame} <\code>

But for some reason I mess the populating/emptying/and moving the frame up so readily.

edit: disregard all that - a sliding frame is exactly what I need. So I guess were done here :D. Thank you all! Learned a lot of other stuff on the side also :)


Comment on Re^6: Reading files n lines a time

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (21)
As of 2015-07-07 14:04 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 (88 votes), past polls