=head1 NAME
-perlfaq6 - Regexes ($Revision: 1.5 $, $Date: 2001/12/02 01:55:12 $)
+perlfaq6 - Regular Expressions ($Revision: 1.8 $, $Date: 2002/01/31 04:27:55 $)
=head1 DESCRIPTION
sub preserve_case {
my ($from, $to) = @_;
my ($lf, $lt) = map length, @_;
-
+
if ($lt < $lf) { $from = substr $from, 0, $lt }
else { $from .= substr $to, $lf }
-
+
return uc $to | ($from ^ uc $from);
}
=head1 AUTHOR AND COPYRIGHT
-Copyright (c) 1997-1999 Tom Christiansen and Nathan Torkington.
+Copyright (c) 1997-2002 Tom Christiansen and Nathan Torkington.
All rights reserved.
This documentation is free; you can redistribute it and/or modify it