gman has asked for the wisdom of the Perl Monks concerning the following question:
UPDATE:#!/usr/local/bin/perl -w use strict; my %numbers = ( '210' => 'rg1000', '212' => 'rg1000', '214' => 'rg1000', '215' => 'rg1000', '218' => 'rg1003', '221' => 'rg1000', '222' => 'rg1003', '223' => 'rg1003', '224' => 'rg1003' ); # if the first 2 digit match and point to the same rg then print only +the first two digits with the rg foreach my $item (keys %numbers) { print "$item\n"; } #desired output # 21 => rg1000 # 218 => rg1003 # 22 => rg1003 # 221 => rg1000
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: summarization of list
by ikegami (Patriarch) on Mar 15, 2006 at 03:03 UTC | |
|
Re: summarization of list
by Zaxo (Archbishop) on Mar 15, 2006 at 03:13 UTC | |
|
Re: summarization of list
by GrandFather (Saint) on Mar 15, 2006 at 03:24 UTC | |
|
Re: summarization of list
by sgifford (Prior) on Mar 15, 2006 at 03:09 UTC | |
|
Re: summarization of list
by ayrnieu (Beadle) on Mar 15, 2006 at 03:16 UTC | |
by ikegami (Patriarch) on Mar 15, 2006 at 05:47 UTC | |
by ayrnieu (Beadle) on Mar 15, 2006 at 06:01 UTC | |
|
Re: summarization of list
by gman (Friar) on Mar 15, 2006 at 12:24 UTC | |
by QM (Parson) on Mar 15, 2006 at 17:44 UTC | |
by gman (Friar) on Mar 15, 2006 at 18:14 UTC |