Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2014-10-25 09:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (142 votes), past polls