|
Prev: Cheap Price !! 25 Years AF1 Shoes, Timberland UGG Boots, Diesel Evisu Shoes
Next: BUG: Ruby 1.8.7 - io.c Argument Error in syscall,"string containsnull byte"
From: Justin To on 29 Jun 2008 21:16 Hi, just wondering how I would skip the first line of a file? File.open('file.txt', 'r').each do |line| # start on the 2nd line end Thanks! -- Posted via http://www.ruby-forum.com/.
From: Justin To on 29 Jun 2008 22:00 Thanks, helps a lot. How about if I am using FasterCSV? require 'fastercsv' File.open("file.txt', 'r') do |file| file.readline FasterCSV.foreach("#{file}") do |row| end end Invalid argument #<file...> Mmm... not sure how I would do it then! =) Thanks -- Posted via http://www.ruby-forum.com/.
From: Justin To on 29 Jun 2008 22:57
Terrific, thanks so much! -- Posted via http://www.ruby-forum.com/. |