1up gfx
1/3/2008 7:55:00 AM
[Note: parts of this message were removed to make it a legal post.]
W
On Jan 3, 2008 12:48 AM, Wes Bailey <wes@verticalresponse.com> wrote:
> On Jan 2, 2008, at 11:28 PM, 1up gfx wrote:
>
> > I'm new to Ruby, and have basically NO previous coding experience in
> > any
> > other language.
> >
> > What I'm trying to do is create a program that will run from cmd
> > prompt, and
> > let people type in words, or paragraphs etc., and then have those
> > words etc.
> > reversed.
> >
> > Example:
> >
> > This is my sentence => sentence my is This
> >
> > Any help with this would be greatly appreciated!
>
> ~> ruby -e 'ARGF.each { |l| puts l.split.reverse.join( " " ) }'
> this is my sentence
> sentence my is this
>
> Its a great answer to your assignment if you can explain what all is
> happening. Good Luck!
>
> Wes
>
> Well, It's not really an assignment. I'm getting my cousin (who is a Java
> programmer) to help me out with programming. He's basically just giving me
> little tasks to do so that I become more familiar with programming. But,
> since I don't really have any previous experience, I don't really know what
> to do half of the time. Thanks for your replies though.
>