# Reading file multiple field

**URL:** <https://www.ruby-forum.com/t/reading-file-multiple-field/175620>\
**Category:** Rails\
**Created:** [September 16, 2009, 4:52pm UTC](https://www.ruby-forum.com/t/reading-file-multiple-field/175620 "2009-09-16T16:52:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashanth\_hiremath](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/df705f/32.png) [@prashanth\_hiremath](https://www.ruby-forum.com/u/prashanth_hiremath)\
**Post date:** [September 16, 2009, 4:52pm UTC](https://www.ruby-forum.com/t/reading-file-multiple-field/175620/1 "2009-09-16T16:52:08Z")

</div>

Hi hassan,

```
       I have an file x.txt which have an

```

DestinationID|Name|City|StateProvince|Country|Latitude|Longitude|Type

there are the fileds i have and also the data i want to read the file  
line  
by line into 2D

array and i have to extract Latitude Longitude from the array.

Regards

Prashu

---

<div class="post-metadata">

**Author:** ![prashanth\_hiremath](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/df705f/32.png) [@prashanth\_hiremath](https://www.ruby-forum.com/u/prashanth_hiremath)\
**Post date:** [September 16, 2009, 5:12pm UTC](https://www.ruby-forum.com/t/reading-file-multiple-field/175620/2 "2009-09-16T17:12:55Z")

</div>

prashanth hiremath wrote:

> Hi hassan,

> ```
> I have an file x.txt which have an
> 
> ```
> 
> DestinationID|Name|City|StateProvince|Country|Latitude|Longitude|Type
> 
> there are the fileds i have and also the data i want to read the file  
> line  
> by line into 2D
> 
> array and i have to extract Latitude Longitude from the array.
> 
> Regards
> 
> Prashu

(I usually don’t do this, but I make an exception in this case)

Seriously dude…

1. Learn to use a search engine
2. Ask A Question
3. Ask your question on the appropriate forum - none of yours have  
anything to do with Rails
4. TRY to write some code…

---

<div class="post-metadata">

**Author:** ![prashanth\_hiremath](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/df705f/32.png) [@prashanth\_hiremath](https://www.ruby-forum.com/u/prashanth_hiremath)\
**Post date:** [September 16, 2009, 6:12pm UTC](https://www.ruby-forum.com/t/reading-file-multiple-field/175620/3 "2009-09-16T18:12:21Z")

</div>

Unless what he wants is a file that is uploaded in a rails app? I  
guess that could be what he wants… If that is so then have a look at  
this:

[http://fastercsv.rubyforge.org/](http://fastercsv.rubyforge.org/)

> **[1. Rails and FasterCSV Intro...](http://akkdio.blogspot.com/2008/05/rails-and-fastercsv-intro.html)**
>
> This is my attempt to use the FasterCSV plugin for rails. I am a very begin, begin again, programmer so it is my hope the some of this is t...

---

<div class="post-metadata">

**Author:** ![prashanth\_hiremath](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/df705f/32.png) [@prashanth\_hiremath](https://www.ruby-forum.com/u/prashanth_hiremath)\
**Post date:** [September 16, 2009, 9:46pm UTC](https://www.ruby-forum.com/t/reading-file-multiple-field/175620/4 "2009-09-16T21:46:01Z")

</div>

On Wed, Sep 16, 2009 at 9:49 AM, prashanth hiremath  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi hassan,

And everyone else? You realize thousands of Rails developers read  
your list emails right?

> ```
> I have an file x.txt which have an
> 
> ```
> 
> DestinationID|Name|City|StateProvince|Country|Latitude|Longitude|Type
> 
> there are the fileds i have and also the data i want to read the file line  
> by line into 2D
> 
> array and i have to extract Latitude Longitude from the array.

What is the question? Where’s your own failed attempt at solving the  
problem?

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)
