Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Perl 6 implementation of the following Perl 5 code

by moritz (Cardinal)
on May 27, 2013 at 11:13 UTC ( [id://1035391]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use v6;
    print join ' ', reverse .words for
    ...
             .map({ [+<<.words[*-1, 0], $_]})\
             .sort\
             .map(*[2])
    
  2. or download this
    use v6;
    
    ...
    ==> my @lines;
    
    print ~.words.reverse for @lines;
    
  3. or download this
    class Line {
        has $.str handles 'words';
    ...
    
    
    print lines().map({Line.new(str => $_)}).grep(/SRC1/).sort;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-18 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found