From: Ned Konz Date: 2002-07-07T14:38:05+09:00 Subject: Re: unshifting a directory onto ENV['PATH'] On Saturday 06 July 2002 10:11 pm, Bil Kleb wrote: > Is there a more elegant (compact?) method than > > ENV['PATH'].split(':').unshift('mystuff').join(':') But that doesn't change ENV['PATH'], does it? > or > > ENV['PATH'] = 'mystuff:' + ENV['PATH'] > > for prepending something to ENV['PATH']? Unfortunately, this doesn't work for some reason... ENV['PATH'][0,0] = 'mystuff:' nor this: ENV['PATH'].sub!(/^/, 'mystuff:') -- Ned Konz http://bike-nomad.com GPG key ID: BEEA7EFE