From: "JeremyWoertink@..." Date: 2007-11-16T08:16:04+09:00 Subject: Re: Recursion help. oh, I thought it was just where you have an iteration inside another iteration or like nested loops or something. Hmm. Thanks for the help. I tried your version of the program. It seems to go into an endless loop, or just takes a REALLY long time. I stopped it after 30 seconds. Honestly, I don't really understand a whole lot of this. I just kind of throw things together until they work, but I am getting a lot better at understanding, which is why I like to see if people can make my program better. I can then ask why they did the things they do. So, I see why you would use "w" and not "w+", but why do you use the ARGV[0] ||? I know that ARGV is an array, but I don't know what it is used for, or why you would use it instead of making your own array. Also, why would you assign the filename the user input *or* ARGV[0]? The thing with the each_with_index is that the second record will have a sequence of 2, and it should have a sequence of 1. So sequence only goes up to the total carton size. It is a ?? of ?? cartons i.e. 1 of 12 - 12 of 12. This stuff gives me a good head start though, thanks for the information. ~Jeremy On Nov 15, 10:15 am, Sebastian Hungerecker wrote: > JeremyWoert...@gmail.com wrote: > > I suck at recursion, and I need some help understanding where I'm > > going wrong here. > > You're not using recursion at all in your code. Recursion is if a method > invokes itself. > > -- > NP: Moonsorrow - Kivenkantaja > Jabber: sep...@jabber.org > ICQ: 205544826