note
kennethk
This definitely sounds like a job for [doc://perlretut|regular expressions]. You should be able to grab the word to the left of <c>searching</c> [doc://perlretut#Using-character-classes], specifically <c>\S</c>, which "represents any non-whitespace character". You can then use that to write your own sorting routine, as described in [doc://sort]. Don't forget that [doc://perlop#Equality-Operators|cmp] is case sensitive, so you may want to use [doc://lc] in your comparison.
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-712372">
<hr />
<p>#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.</p>
</div></div>
1003644
1003644