Wednesday, January 15, 2020

Perl : Print the Letters of the Alphabet, One Per Line

Never mind why (actually, I'll tell you - it's because stinking Excel easily gives you 1,2,3..26 after you type 1,2,3 and then drag. But, it doesn't do that with letters after you type a,b,c,d.. and drag:) - and, yes, it's to encrypt a password that I store in my gmail - yes. take the letter and spell out the number in a different language - you got me.

Now, get me

a
b
c
..
..
z

rookie   perl -e 'foreach (97..122){print chr($_),"\n";}'
practitioner   perl -le 'foreach (97..122){print chr($_);}'
expert   perl -le 'foreach ('a'..'z'){ print }'
master   perl -le 'print foreach 'a'..'z';'

No comments: