in reply to play with phone numbers & w perl :)

It looks like %telealph and @telear are two different views of the same data. For cases like this, I'd suggest maintaining whichever one is more obvious, and building the other from it:
my %telealph = ( ( map { $_ => $_ } ( 0 .. 9 ) ), ( map { my $d = $_; map { $_ => $d } @{ $telear[$d] } } ( 0 .. $#t +elear ) );

Replies are listed 'Best First'.
Re: Re: play with phone numbers & w perl :)
by dominix (Deacon) on Dec 27, 2003 at 11:24 UTC
    that a very cool improvement, thanks, I add it right now to original code so the script become :
    Updates : I've decided to put all enhancement typo-fix and recommendation in the main post, so it is ready to use for new readers
    --
    dominix