Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

uksza's scratchpad

by uksza (Canon)
on Sep 03, 2004 at 21:28 UTC ( [id://388419]=scratchpad: print w/replies, xml ) Need Help??

#!/usr/bin/perl #getting while (<stdin>) { chomp; s/\s{2,}//g; s/[^a-zA-z\s]//g; last if ( $_ eq "" ) ; if (m/\w\s\w/) { push @words, (split); next; } push @words, $_; } #counting foreach (@words) { $list{$_} = length; } #printing @result = sort { $list{$b} <=> $list{$a} } keys %list; print "\n"; foreach (@result) { print "$_\n";

Vim as a Perl IDE (perl-support.vim)
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-19 02:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found