From: Peter Hickman Date: 2005-01-20T20:48:14+09:00 Subject: Re: Confused about variable "declarations" A variable will 'spring into existence' when you assign to it but not when you reference it. so: offset = offset=line.split()[1].to_i will work fine but something like total = offset + 1 or offset = offset + 1 or table[offset] = 42 will all error because they are referencing a variable that has not been created. If you look at, or around, line 136 in your code you will probably find a reference to the variable offset and this is what is causing the problem. If not then I am stumped.