Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: searching for strings

by FunkyMonk (Chancellor)
on Aug 06, 2007 at 14:16 UTC ( [id://630827]=note: print w/replies, xml ) Need Help??


in reply to Re^3: searching for strings
in thread searching for strings

Typo corrected and enstricted

my @d = qw(AAA30 BBC5 SHT12H DAL33B BBC49 AAA31 DAL33A BBC6 SHT12G BBC +50); my %seen; map { print "$seen{$_},$_\n" if $seen{$_}; } map { my $v = $_; my $l = chop $v; $seen{$v.++$l}=$_; } @d; __END__ SHT12G,SHT12H DAL33A,DAL33B AAA30,AAA31 BBC5,BBC6

BBC49,BBC50?

my @d = qw(AAA30 BBC5 SHT12H DAL33B BBC49 AAA31 DAL33A BBC6 SHT12G BBC +50); my %seen; map { print "$seen{$_},$_\n" if $seen{$_}; } map { (my $v = $_ ) =~ s/(\d+|[A-Z])$//; my $l = $1; $seen{$v.++$l}=$_ +; } @d; __END__ SHT12G,SHT12H DAL33A,DAL33B AAA30,AAA31 BBC5,BBC6 BBC49,BBC50

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found