Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Extracting non-consecutive but related items from an array.

by TedPride (Priest)
on Jun 15, 2005 at 20:22 UTC ( #467047=note: print w/replies, xml ) Need Help??

in reply to Extracting non-consecutive but related items from an array.

use strict; use warnings; my %h; while (<DATA>) { chomp; @_ = split /, /, $_, 2; push @{$h{lc($_[0])}}, $_[1]; } for (sort keys %h) { print "$_\n"; print " $_\n" for sort @{$h{$_}}; print "\n"; } __DATA__ server_A, Perl, UK server_A, Word, UK server_A, Outlook, UK server_A, Excel, UK server_B, Reuters, NL server_B, TradeXL, NL server_B, Thompsons, NL server_B, Bloomberg, NL server_B, Tibco, NL server_c, BasketLink, USA server_c, Evolution, USA server_c, Lotus, USA server_c, TIB, USA server_A, Python, UK

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://467047]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2017-06-24 23:13 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (562 votes). Check out past polls.