Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

fw (8970)

  (email not shown publicly)
+ -

  Journal: more commands! on 2010.04.06 2:26

Journal by fw on 2010.04.06 2:26
User Journal

In reply to fREW Schmidt's and Ovid's top 10 history commands, here is my list:

Read More 0 comments

+ -

  Journal: First Perl6 program on 2008.12.09 16:43

Journal by fw on 2008.12.09 16:43
User Journal
This one reads STDIN, counts words (here words are things between whitespace), and prints them sorted in descending order by occurrence.

my %words;

$*IN.lines.split(/\s+/).map: { %words{$_}++ };

for %words.pairs.sort: { $^b.value <=> $^a.value } -> $pair {
    say $pair

see also: this node at perlmonks

Read More 3 comments
Comments: 3
+ -

  Comment: RT link (Score 1) on 2008.12.09 5:37

by fw on 2008.12.09 5:37 (#66367)
Attached to: Fixes for Rakudo, and Parrot too
Maybe a stupid question, but where lives the Rakudo RT? Thanks.
Read More 2 comments
Comments: 2