Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^4: ordering array of sentences

by welle (Beadle)
on Nov 13, 2012 at 17:51 UTC ( #1003679=note: print w/ replies, xml ) Need Help??

in reply to Re^3: ordering array of sentences
in thread ordering array of sentences

I got it. Thank you!

In a very ugly Perl, I translated it so:

my @sentences1 = map { /(\w+)\s+searching/; [$1, $_] } @sentences +; my @sentences2 = sort { $a->[0] cmp $b->[0] } @sentences1; my @sentences3 = map {$_->[1]} @sentences2; foreach (@sentences3) { print $_; }

...just to lear Perl

Comment on Re^4: ordering array of sentences
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003679]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2015-12-01 03:25 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (792 votes), past polls