From: pharrington Date: 2010-01-01T13:55:09+09:00 Subject: Re: doubts about variables in ruby On Dec 31, 9:41 pm, Junior Linux wrote: > well my doubt is: > > I want to make a ruby program that number in a URL and checks if the url > has a forum. for exemple : > > puts("enter an address"); > endereco =gets() > @forum = "/forum" > system("firefox "+ endereco+ @forum); > > the code does not work, it opens the page with the site but the variable > @ forum runs only after I close the open page, and as command not found > (like I try to use the command / forum) > > how can i put it all together and make url.com / forum? > > PS : Sorry for my spelling errors, I'm from Brazil :D > -- > Posted viahttp://www.ruby-forum.com/. gets() retains the newline when the user presses enter try stripping the newline (endereco = gets().chomp)