Help for this page
split /(\d+)/
sub natcomp { my @a = split /(\d+)/, $a; ... } return scalar @a <=> scalar @b; # shortest array comes first }
chomp(my @array = <DATA>); $\ = "\n"; ... Chapter 1 Section 3 Chapter 10 Section 2 Chapter 2 Section 1