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

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'],

Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2019-10-23 11:10 GMT
Find Nodes?
    Voting Booth?