Re: problem in writing code(switch/case)or enum

2001-10-04 Thread Bill Jones
On 10/4/01 2:54 AM, "Rahul Garg" <[EMAIL PROTECTED]> wrote: > what i want is : > > $s_month can be 1 to 12 > if($s_month == 1){$s_month = 'JAN'};and so on > how can i do it. ? http://www.cpan.org/authors/id/S/SN/SNEEX/cal.perl_v2A HTH/-Sx- :] -- To unsubscribe, e-mail: [EMAIL PROTECT

RE: problem in writing code(switch/case)or enum

2001-10-03 Thread Gibbs Tanton - tgibbs
Well, you could use an array: my @months = qw(JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC); then you can say $months[$s_month-1] to get the string value. -Original Message- From: Rahul Garg To: [EMAIL PROTECTED] Sent: 10/4/2001 1:54 AM Subject: problem in writing code(switch/case

problem in writing code(switch/case)or enum

2001-10-03 Thread Rahul Garg
what i want is : $s_month can be 1 to 12 if($s_month == 1){$s_month = 'JAN'};and so on how can i do it.