in reply to More Date Conversion Happiness, Part 2
Take another look at variable declaration. You $MM is local, but the otehrs are global. You want:
my ( $MM, $DD, $YY, $YYYY );
If you don't assign anything to them, they wind up undef, which is the same value you explicitly assign to them.
The first two date formats differ only in zero-padding the day. Both will use the same split code, the only difference will be the precise return value. Similarly, the slash-delimited formats differ only in the segment of the hash used in looking up the corresponding month; otherwise they are identical.
Now if you want a REAL challenge, figure out how to differentiate between US, English and European formats:
--
TTTATCGGTCGTTATATAGATGTTTGCA
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: More Date Conversion Happiness, Part 2
by ctp (Beadle) on Jan 11, 2004 at 18:21 UTC |