I didn't see a perl version, so here goes: for(split(//, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')) { print $_, "\n"; } It's probably not the right language but I can't resist sending in these small snippets if code :)