On Jul 17, 2006, at 9:19 PM, Xavier Hanin wrote:

> Hi all,
>
> I'm brand new to ruby, and I'm looking for a way to open a file, read
> its content and modify it. I've seen that I can open a file in read
> write mode, but I can't figure out how it works. If I want to replace
> all occurences of 'search' by 'replace', for instance, what do I  
> have to
> do?
>
> Searching for an answer to this question, I've found scripts using  
> gsub!
> What is this exclamation mark?
>
> Thanks in advance for your help!
>
> Xavier
>
> -- 
> Posted via http://www.ruby-forum.com/.
>

The ! (pronounced bang usually) means that a method is a "dangerous"  
version of a method with the same name. In this particular case it  
means that it's the inplace version of gsub (global substitution).