I'm trying to figure out why the following code chunk fails to edit my
file in-place:
$-i = '.foo' # set in-place edit mode
mf = File.open('Makefile', 'r+')
mf.each_line do |line|
line.sub!(/-l\$\(RUBY_INSTALL_NAME\) /, "")
end
mf.close
Any ideas?
Ian
--
Ian Macdonald | Life is like an onion: you peel off layer
ian / caliban.org | after layer and then you find there is
| nothing in it. -- James Huneker
|
|