in reply to weird subroutine behavior
I ran the solution proposed by kyle against my corpus of documents and I found another exception.
If you run only "section 1" with the below data input, the solution proposed by kyle will introduce the improper behavior of the subroutine, while the original version will work ok.
my $st5 = 'PASAI OUN AI GENEAI APO ABRAAM EWS DABID GENEAI DEKATESSARE +S KAI APO DABID EWS THS METOIKESIAS BABULWNOS GENEAI DEKATESSARES KAI + APO THS METOIKESIAS BABULWNOS EWS TOU XRISTOU GENEAI DEKATESSARES'; my $st6 = 'PASAI OUN AI GENEAI APO ABRAAM EWS DAUID GENEAI DEKATESSARE +S KAI APO DAUID EWS THS METOIKESIAS BABULWNOS GENEAI DEKATESSARES KAI + APO THS METOIKESIAS BABULWNOS EWS TOU XRISTOU GENEAI DEKATESSARES';
Note: add and remove the "|| $b cmp $a" from the end of "sort" to see the different behavior.
I really appreciate your time and efforts to help me find a solution for this weird and difficult problem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: **reopened**Re: weird subroutine behavior
by kyle (Abbot) on Apr 03, 2008 at 15:37 UTC | |
by flaviusm (Acolyte) on Apr 03, 2008 at 16:07 UTC | |
by kyle (Abbot) on Apr 03, 2008 at 19:24 UTC |