Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2018-07-16 11:16 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (333 votes). Check out past polls.