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

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 (Priest) 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2017-12-13 02:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (344 votes). Check out past polls.

    Notices?