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!