sub isalphabetical { for my $i (0..(length($_[0])-2)) { return 0 if lc(substr($_[0],$i,1)) gt lc(substr($_[0],$i+1,1)); } return 1; }