From: Sebastian Hungerecker Date: 2007-12-07T00:01:37+09:00 Subject: Re: Capturing STDOUT from a system call (POSIX) into an array Venks wrote: > I also understand that map and collect! are the same. map and collect are the same. As are map! and collect!. map/collect and map!/collect! however are NOT the same. Consider this: arr = [1,2,3] p arr.map {|x| x+1} # Prints [2, 3, 4] p arr # Prints [1, 2, 3] arr = [1,2,3] p arr.map! {|x| x+1} # Prints [2, 3, 4] p a # Prints [2, 3, 4] too. HTH, Sebastian -- Jabber: sepp2k@jabber.org ICQ: 205544826