Hi all
I need to generate simple sequences of $n characters, for any positive $n (within reason), starting at 'a' and wrapping back to 'a' after 'z'.
The first code line in my loop, below, generates the sequence that I need.
Question 1: Other / better / faste ways of generating this sequence, anyone?
Question 2: Why does my second code line generate something entirely different?
for my $n (25..28) {
printf"%s\n",pack"C*",map{$_%26+ord'a'}0..$n-1; # ok
printf"%s\n",pack"C*",map{ord'a'+$_%26}0..$n-1; # not ok
}
__END__
abcdefghijklmnopqrstuvwxy
0123456789111111111122222
abcdefghijklmnopqrstuvwxyz
01234567891111111111222222
abcdefghijklmnopqrstuvwxyza
012345678911111111112222220
abcdefghijklmnopqrstuvwxyzab
0123456789111111111122222201
Rudif