ye's all.

I'm trying to sort my hash with a series of different sorts. this is the code i'm using it seems to work. first, its sorts my list alphabetically then numerically by the number in {tag}.
foreach my $server ( sort {$my_server_hash {$a} cmp $my_server_hash {$ +b} && $my_server_hash{$a}{tag} <=> $my_server_hash{$b}{tag} } keys %my_server_hash)
to this i want find a string in  $my_server_hash{$server}{ADMINS} and drop that/them "record"s to last if a match is obtained; then finally - any 53s in the  $my_server_hash{tag} "records" need to be dropped to last.

i know i need to tidy up my code.

I have spent ages looking in books and websites but i am unable to find any code samples that i can get my head around.

can anyone offer any direction and/or some sample code to get me started?

this is a link to the output i'm trying to format..

i have me data, i just want it to look nice! thanks and good day.

C,.

In reply to hash sort problems by Conal

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.