It's definitely worth the effort. Let me see if I can break down the map I gave (and maybe clean it up a bit). Starting from
map { /^(.*)(?>(?:\s.{1,5}(:\d+)*.*))/; [$_, $sortdata{$1}, $2, $3] }
you should read it like
map { my ($book, $chapter, $verse) = /^(.*)(?>(?:\s.{1,5}(:\d+)*.*))/; + [$_, $sortdata{$book}, $chapter, $verse] }
(I'm taking for granted that your regex works like that) For each element of your list, it
  1. assigns the element to $_
  2. applies the regex and assigns the captures to ($book, $chapter, $verse)
  3. creates an anonymous array [ ] with the original element at index 0 and the other 3 which you'll use in the sort
  4. passes it on to the next process
so from your first list, you get a list of anonymous arrays for your sort which you can reference using $_->2 for the chapter, etc. Also remember that $a->[1] <=> $b->[1] sorts numerically while $a->[1] cmp $b->[1] sorts alphabetically. The map on the other side of the sort takes the list of sorted anonymous arrays and reduces it to the original elements, now sorted.

A better explanation of the Transform is in the Modern Perl book

Sometimes I can think of 6 impossible LDAP attributes before breakfast.

In reply to Re^3: Regex Substring SORT Conundrum by Ea
in thread Regex Substring SORT Conundrum by Polyglot

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.