Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 lurking in the Monastery: (6)
As of 2014-12-20 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (96 votes), past polls