Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
File question
Justin To
6/30/2008 1:17:00 AM
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-...
.
2 Answers
Justin To
6/30/2008 2:01:00 AM
0
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-...
.
Justin To
6/30/2008 2:57:00 AM
0
Terrific, thanks so much!
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
File question
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password