Moon, John wrote: > Does any one know how to do this with just a substitution? > > perl -e '$a=q{Data.m1234.D1234567890}; > $a =~/\d+$/; > $numbers = q{#} x length($&); > $a=~ s/\d+$/$numbers/; print "$a\n";' > > What " Data.m1234.D########## " as a result. > > John W Moon
Did the following: perl -e '$a=q{Data.m1234.D1234567890}; $a =~ s/(\d+)$/'#'x length($1)/e; print "$a\n"; output was: Data.m1234.D########## Wags ;) ******************************************************* This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. ******************************************************* -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>