Thanks, very helpful!

-- Drew.

--- Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote:
> On Jun 18, Drew Cohan said:
> 
> >while (<>){
> >     s/[abc]/2/gi;
> >     # 3-8 left out for brevity
> >     s/[wxy]/9/gi;
> >}
> >
> >to convert a list of words into numbers based on
> the
> >phone keypad?
> 
> This is why tr/// is useful.
> 
>   while (<>) {
>     $_ = lc;
>     tr{abcdefghijklmnoprstuvwxy}
>       {222333444555666777888999};
>   }
> 
> -- 
> Jeff "japhy" Pinyan      [EMAIL PROTECTED]     
> http://www.pobox.com/~japhy/
> I am Marillion, the wielder of Ringril, known as
> Hesinaur, the Winter-Sun.
> Are you a Monk?  http://www.perlmonks.com/    
> http://forums.perlguru.com/
> Perl Programmer at RiskMetrics Group, Inc.    
> http://www.riskmetrics.com/
> Acacia Fraternity, Rensselaer Chapter.        
> Brother #734
> **      Manning Publications, Co, is publishing my
> Perl Regex book      **
> 


__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/

Reply via email to