Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Simple question

by indigo (Scribe)
on Apr 24, 2001 at 00:14 UTC ( [id://74853]=note: print w/replies, xml ) Need Help??


in reply to Simple question

arturo answered the question you asked, but this might be a better way of doing what you are doing:
my %cardinal = ( 1 => '1st', 2 => '2nd', 3 => '3rd', map { $_ => "${_}th" } 4 .. 9 ); print $cardinal{$digit};

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-18 05:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found