I have to replace months alphabets to months nos. in a string.
$date =~ s/Mar/03/g;
$date =~ s/Apr/04/g;
$date =~ s/May/05/g;
I don't want to repeat the same for tweleve months.
Is there any shorter way to do it?
like e.g. $date =~ s/Mar,Apr,May/03,04,05/g;
Thanks,
Zeshan.
$date =~ s/Mar/03/g;
$date =~ s/Apr/04/g;
$date =~ s/May/05/g;
I don't want to repeat the same for tweleve months.
Is there any shorter way to do it?
like e.g. $date =~ s/Mar,Apr,May/03,04,05/g;
Thanks,
Zeshan.