From: 1up gfx Date: 2008-01-04T08:23:51+09:00 Subject: Re: Help Please! ------=_Part_3168_9402854.1199402635672 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Jan 3, 2008 12:58 PM, Joshua Schairbaum wrote: > You don't use irb for that. At the command prompt, that's the ruby > command you give it. > $F = is an environmental variable that can receive split line input > as an array > > a = autosplit mode, basically takes the input and splits it out > n = pauses the command, like assuming a "while" command > e = the command > > regards, > ch0wda > On Jan 3, 2008, at 2:46 PM, 1up gfx wrote: > > > On Jan 3, 2008 10:53 AM, Joel VanderWerf > > wrote: > > > >> Wes Bailey wrote: > >>> ~> ruby -e 'ARGF.each { |l| puts l.split.reverse.join( " " ) }' > >>> this is my sentence > >>> sentence my is this > >> > >> Golfing away... > >> > >> $ ruby -ane 'puts $F.reverse.join(" ")' > >> 1 2 3 > >> 3 2 1 > >> > >> -- > >> vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 > >> > >> It doesn't like your code... I keep on getting errors: > > > > irb(main):001:0> puts $F.reverse.join(" ") > > NoMethodError: undefined method `reverse' for nil:NilClass > > from (irb):1 > > irb(main):002:0> > > > Alright, never mind, I got the program to work. Thank you for your help guys! ------=_Part_3168_9402854.1199402635672--