Not sure about order of items, but:

#!/usr/bin/perl # http://perlmonks.org/?node_id=1170708 use strict; use warnings; $/ = "-----\n"; my %programs; while(<DATA>) { /^(\S+): (\S+)\nProgram:(\S+)/m and $programs{$3}{$1}{$2} = 1; } #use YAML; print Dump \%programs; for my $program (sort keys %programs) { print "\nPROGRAM: $program\nChangeIDs:\n"; my $numbers = 1; for my $foo ( sort keys %{ $programs{$program} } ) { print "$numbers.$foo\n"; $numbers++; my $letters = 'a'; for my $bar ( sort keys %{ $programs{$program}{$foo} } ) { print " $letters.$bar\n"; $letters++; } } } __DATA__ ------------------------------------------ DEV: COM-1258 Program:Testing Reviewer:Jackie Description:New Entries rev:r145201 ------------------------------------------ QA: COM-9696 Program:Testing Reviewer:Poikla Description:Some random changes rev:r112356 ------------------------------------------ JIRA: COM-1234 Program:Development Reviewer:John Wick Description:Genral fix rev:r345676 ------------------------------------------ JIRA:COM-1234 Program:Development Reviewer:None Description:Updating Received rev:r909276 ------------------------------------------ JIRA: COM-6789 Program:Testing Reviewer:Balise Mat Description:Audited rev:r876391 ------------------------------------------ JIRA: COM-8585 Program:Testing Reviewer:Gold frt Description: yet to be reviewed rev:r565639

In reply to Re: Perl output format by Anonymous Monk
in thread Perl output format by voltas

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.