in reply to Re: ordering array of sentences
in thread ordering array of sentences
Thanks,it works (couple of changes can be necessary for taking into account case, commas, etc. BUT: as I am a newbe in perl, could you "split" (i.e. putting it in simpler blocks) for me the lines
say for map $_->[1], sort { $a->[0] cmp $b->[0] } map { /(\w+)\s+searching/; [$1, $_] } @sentences;
so that I better understand its functioning. For example, I am trying to put the result of the sorting again in an array, but I can't do it. That would be great!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: ordering array of sentences
by choroba (Cardinal) on Nov 13, 2012 at 16:58 UTC | |
by welle (Beadle) on Nov 13, 2012 at 17:51 UTC | |
by welle (Beadle) on Nov 13, 2012 at 19:24 UTC | |
by afoken (Chancellor) on Nov 14, 2012 at 06:18 UTC |
In Section
Seekers of Perl Wisdom