in reply to Index sorting
Update: added " to first $tempb substitution. Untested, but I think this does what you want.sub by_level { my $tempa =~ s/^<.*">//; $tempa =~ s/<\/.*>//; my $tempb =~ s/^<.*">//; $tempb =~ s/<\/.*>//; substr($a,0,2) cmp substr($b,0,2) || $tempa cmp $tempb; }
|
|---|