我需要这个脚本来拆分大写字母和数字。我已经对大写字母部分进行了拆分,但我似乎无法弄清楚它的数字方面。
需要的结果:Hvac System 8000 Series :: Heating System 8000 Series :: Boilers
#!/usr/bin/perl
print "Content-type: text/html\n\n";
use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use strict;
my $Last_URL = "HvacSystem8000Series/HeatingSystem8000Series/Boilers";
my ($Cat,$Sub1,$Sub2) = split(/\//, $Last_URL, 3);
if ($Sub2) {
$Last_URL = "<b>$Cat :: $Sub1 :: $Sub2</b>";
}
else {
$Last_URL = "<b>$Cat :: $Sub1</b>";
}
my @Last_URL = $Last_URL =~ s/(.)([A-Z][^A-Z][^0-9])/$1 $2/g;
print "$Last_URL";