* Brian Morgan <[EMAIL PROTECTED]> [2004-05-14 13:19]:
> ($Yr = $FieldA) =~ s/^(\d{2}).*/$1/;
> if($Yr > 20){
>    $Yr = "19$Yr";
> }else{
>    $Yr = "20$Yr";
> }

It isn't exactly to your specs (equates to checking $Yr > 19),
but could be made to, at the expense of much more complicated
patterns.

$year =
    $FieldA =~ /^([0-1]\d)/ ? 2000 + $1 :
    $FieldA =~ /^([2-9]\d)/ ? 1900 + $1 :
    die "Expected two digits at start of '$FieldA'";

-- 
Regards,
Aristotle
 
"If you can't laugh at yourself, you don't take life seriously enough."

Reply via email to