Patrick Hall wrote:
> 
> <br><a href="http://www.ocf.berkeley.edu/";>nutz0</a>
> <br><a href="http://mundissa.com/";>cron&oacute;pios</a>
> <br><a href="http://feralliving.blogspot.com";>feral living</a>
> <br><a href="http://underwatergirl.blogspot.com";>so blue it&#39;s black</a>
> <br><a href="http://genehack.org/index.html";>genehack</a>
> 
> Etc, just a big list of links.
> 
> I'd like to sort it by the contained text (i.e., by
> 'nutzO', 'cron&oacute;pios', 'feral living', etc.), so
> that the links appear in alphabetical order.
> 
Let's keep simple stupid :-)

Obviously, this is very structured.
We've got a lot of luck, we can sort for the text standing between > and
<.
We have to search for text (non-empty) between > and < and to sort:

my @sorted_links =
  sort {"$a $b" =~ />([^<]+)< .* >([^<]+)</x; $1 cmp $2};


Best Wishes,
Andrea

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to