On 2007-07-06 07:39:21 -0500, "aidy.lewis@googlemail.com"
<aidy.lewis@googlemail.com> said:
> Hi,
>
> I am trying to write a script where each line moves the character by 1
> with 5 columns
>
>
>
> AAAAA
>
> AAAAB
>
> AAAAC
>
> ...
>
> AAAAZ
>
> AAABA
>
> AAABB
>
> till we get to ZZZZ
>
> This is what I have
>
> j= 4
> chars=['A','A','A','A','A']
> chars[j].upto("Z") do |i|
> chars[j] = i
> print chars, "\n"
> end
> chars[j-1] = chars[j-1].succ!
> chars[j]= 'A'
> chars[j].upto("Z") do |i|
> chars[j] = i
> print chars, "\n"
> end
>
>
> But having some trouble
>
> Aidy
a='AAAAA'
while a != 'ZZZZZ' do
puts a
a = a.succ
end
# is this what you want?
--
H. Asari