From: Adam Teale Date: 2006-12-06T20:37:05+09:00 Subject: Re: Newbie: working with a text file and converting to xml Hi Peter, I saved your code and called it convert.rb. I ran it (replacing 'filename' with the path of my text file - was that right to do?) i got this error: convert.rb:1: unknown regexp options - atal any ideas? also, do you know if thereis any way to run a script from the commandline like?: ./convert.rb mytextfile.txt i made a shell script that used this kind of thing - it took the input file as something like $ARGV (i think - sorry i'm a super newbie!!) make sense? Thanks Peter! Adam Peter Szinek wrote: > Adam Teale wrote: >> The text file looks pretty much like that > > Then it should be fine - as far as there are no tabs in the second > column. Of course even that would not mean an unsolvable problem but it > would not work with the code I sent you. > >> It'll take a while for your example to filter down into my brain - when >> it does I'll get back to you about it. > > Sure! > >> >> Awesome! > Yeah, Ruby is awesome! I am a beginner, too (picked up Ruby a few months > ago) and though I have very limited time to learn it, I can do a lot of > things already. The learning curve is really steep. > > Cheers, > Peter > > __ > http://www.rubyrailways.com -- Posted via http://www.ruby-forum.com/.