欢迎指正,可能有错:- #!/usr/bin/perl
- use strict;
- use warnings;
-
- while (<DATA>) {
- chomp;
- $_=~s/(\d+(?:\.\d+)?)#+\s*#?$/$1*7/e;
- print "$_\n";
- }
- __DATA__
- 1##4072.0###52.19### #50## #
- 2#38705.8# # # 51.73## #5# #
- 372###389.0##51.80##19.77# # 4#####
- 4##59.71#3715.45##7.5######
复制代码
|