I would suggest a minor change to your data content though. You should either remove the final slash (/) from the first variable, or the first slash from the second. Otherwise your built-up URL will look like:
$about_url = 'http://www.google.com//intl/en/about.html' # the double-slash in the middle is undesirable
Whenever you have doubt or want to play with some ideas, give them a try at the Interactive Ruby (IRB) prompt.
Cheers. Paul C.
On 03/10/06, Astha Raj <[EMAIL PROTECTED]> wrote:
Hi All,
This is what I want to do. I want the base URL of the site to be a variable and to get other pages, I could create varaibles attaching to the base. So that if I have to change the URL, I can simply change the base variable.
Is there any way I can do this – something like below?
$base_url = 'http://www.google.com/'
$about_url = $base_url + '/intl/en/about.html'
Thanks for your help.
Astha
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
