Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: removing lines that are in the end of a file

by davido (Archbishop)
on Apr 05, 2013 at 15:50 UTC ( #1027159=note: print w/replies, xml ) Need Help??


in reply to Re^2: removing lines that are in the end of a file
in thread removing lines that are in the end of a file

No, it would truncate after the first line that ends in SIL that is followed by a line ending in SIL; that much I did test. It works as it should for the data the OP posted, but your read-backwards solution is better because it doesn't make the assumption that SIL lines are only repeated in succession at the end of the file in the real data-set. Had I seen yours before posting I wouldn't have bothered since it's a more reliable variation on the tell and truncate theme. ;)


Dave

  • Comment on Re^3: removing lines that are in the end of a file

Replies are listed 'Best First'.
Re^4: removing lines that are in the end of a file
by BrowserUk (Pope) on Apr 05, 2013 at 16:10 UTC

    Actually, mine's wrong also. Looking back he wants to retain the first of the last set of SIL lines :(

    It should be a simple adjustment though.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027159]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2017-02-25 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (365 votes). Check out past polls.