Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re^2: sorting headers in a file

by hdb (Monsignor)
on Dec 13, 2013 at 08:23 UTC ( #1067003=note: print w/replies, xml ) Need Help??

in reply to Re: sorting headers in a file
in thread sorting headers in a file

Your code relies on a number of implicit assumptions:

  • Using a hash implies that the ">or..." bits are unique. If two or more identical appear, your code would lose data.
  • You also assume that blank lines are of no significance.
  • If there is a multiline sequence, you will only store the last line.

Replies are listed 'Best First'.
Re^3: sorting headers in a file
by 2teez (Vicar) on Dec 13, 2013 at 08:36 UTC

    Your code relies on a number of implicit assumptions:...

    Assumptions that are savely ok considering the OP dataset.
    And that was why I said ..using your dataset.. i.e that of the OP in my previous reply, which I don't suppose have anything which follows "THE" assumptions, you stated. Except the OP has said otherwise to you privately.

    If you tell me, I'll forget.
    If you show me, I'll remember.
    if you involve me, I'll understand.
    --- Author unknown to me

      I did not want to say that anything is wrong with your code. I only thought it useful to highlight the assumptions which you were aware of but probably not every reader of the thread. And I have no additional information about the question.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1067003]
[Discipulus]: genial! one day I' also understand it.. ;=)

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2018-03-23 19:42 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (296 votes). Check out past polls.