Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 chilling in the Monastery: (9)
As of 2015-07-07 23:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls