Hi, I'm kinda new to this programmin thing and I'm currently using
windows vista and it seems whenever I run this file:

line = File.readlines("text.txt")
lines_count = lines.size
text = lines.join
puts "#{line_count} lines"

It will show :

>ruby C:/Users/administrator/analyzer.rb
*** WARNING *** Windows users should check the "Run process in terminal"
check box in the Debugger Preferences
to see STDOUT and STDERR output in real time.

C:/Users/administrator/analyzer.rb:2: undefined local variable or method
`lines' for main:Object (NameError)
>exit

and as you can see, there's an error in the code but I can't seem to
find out what. I have attached the text maybe someone can run it and
tell me what's wrong?

Thanks,

Gen

Attachments:
http://www.ruby-forum.com/attachment/3248/text.txt

-- 
Posted via http://www.ruby-forum.com/.