From: Rolando Abarca Date: 2008-11-14T00:10:01+09:00 Subject: Re: Need tutoring on using a path environment variable On Nov 13, 2008, at 11:42 AM, Yossef Mendelssohn wrote: > Maybe you mean ENV['path'] += ENV['PW_PATH'], or maybe you mean > old_path = ENV['path'].dup oops... you're right (I always forget about this! I even wrote a question about this for the ruby-basic java black belt[1] certification test :-P) > Second, paths have separators, so simply sticking two different path > strings together is going to make something strange at the join. yes sir, I skip those on purpose... :-) (it was too late and it was the last email I wrote before going to bed. I think that the OP should know that PATH is a list of directories that are separated by something, or at least he has the notion, so I only provided an idea on how to solve his problem, not a complete solution, which, IMHO is the best thing, because when you provide a complete solution, most people stick to that and don't think too much around it). Anyway, you should add the path like this: ENV['PATH'] += ";#{ENV['PW_PATH']}" # just in case ENV['PW_PATH'] is nil even if PATH has a ";" at the end, it does no harm to have another one. > Third, I think you mean ENV['PATH'], not ENV['path']. That's also correct. > HTH HAND > -- > -yossef [1] http://www.javablackbelt.com/QuestionnaireDefDisplay.wwa?questPublicId=01548 regards, -- Rolando Abarca M.