Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 exploiting the Monastery: (7)
As of 2014-09-17 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (100 votes), past polls