in reply to Re: Data normalisation
in thread Data normalisation
Another thing I noticed is that we had been happily assigning the matching strings to the same variables used to hold the regular expressions. Not good. So I renamed the variables in this new code segment.if (( ($m, $d, $y) = (/($month)($day)($year)/io) ) || ( ($d, $m, $y) = (/($day)($month)($year)/io) ) ) { $y += 1900 if $y < 100; $m = substr($m, 1, 3); $d =~ s/^(\d+).*$/$1/; print "$d-$m-$y\n"; }
--ZZamboni
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Re: Data normalisation
by Ovid (Cardinal) on Jul 06, 2000 at 21:21 UTC |