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

Re: Replacing $mon with Jan, Feb, Mar by regex or other means

by gawatkins (Monsignor)
on Apr 25, 2003 at 11:49 UTC ( #253138=note: print w/ replies, xml ) Need Help??


in reply to Replacing $mon with Jan, Feb, Mar by regex or other means

jonnyfolk,

The best way that I have found to do this was using a hash.

my %month3letter = ( 12 => 'Jan', 1 => 'Feb', 2 => 'Mar', 3 => 'Apr', 4 => 'May', 5 => 'Jun', 6 => 'Jul', 7 => 'Aug', 8 => 'Sep', 9 => 'Oct', 10 => 'Nov', 11 => 'Dec' );

Or-well mabye I just like hashes, anyway I have had a great deal of success with it.

Thanks,

Greg


Comment on Re: Replacing $mon with Jan, Feb, Mar by regex or other means
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2015-07-28 05:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (252 votes), past polls