Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: (Golf) mobile phone numbers - words

by mischief (Hermit)
on May 29, 2001 at 15:57 UTC ( #83891=note: print w/ replies, xml ) Need Help??


in reply to Re: (Golf) mobile phone numbers - words
in thread (Golf) mobile phone numbers -> words

You could also store it as an array:

my @letters = ( undef, undef, ['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i'], ['j', 'k', 'l'],
etc.


Comment on Re: Re: (Golf) mobile phone numbers - words
Download Code
Re: Re: Re: (Golf) mobile phone numbers - words
by bobione (Pilgrim) on May 29, 2001 at 16:45 UTC
    As it's a Golf, you should use $[=1 or 2 to change array's indice.
    BTW: I don't really understand your problem.

    Update: thanks mischief, for yor explanation.

    BobiOne KenoBi

      The challenge is to write the shortest sub, so changing the indice wouldn't matter.

      The problem is to figure out possible words that you could use instead of your number. Like someone can say "call me on 0602 SEX MAD", and their number would be 0602 739 623, because the letters S E X M A D correspond to the numbers 739 623 on the keypad.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2014-08-22 07:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (148 votes), past polls