Reading variables in a file
Time:2010-01-22 03:24soucre:未知 作者:admin click:clicks
I'm thinking of migrating from Fortran to Ruby. Do you think i should go ahead?? First problem i have. How to read a file with several fields? This means: Imagine a file: Peter4 1990 Sam 3 1980 Grac6 1991 I would like to read for each line:name, order
I'm thinking of migrating from Fortran to Ruby. Do you think i should go ahead??
First problem i have.
How to read a file with several fields? This means:
Imagine a file:
Peter4 1990
Sam 3 1980
Grac6 1991
I would like to read for each line:name, order and year (3 variables per line). How can i do this? and how can i write them into a file??
Thank you in advance.
||| We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 228,204 network members.
------line----------------------------