From: Paul Lutus Date: 2006-11-03T06:30:17+09:00 Subject: Re: str1 = str2 is not a copy?!? Joe Ruby MUDCRAP-CE wrote: / ... > WHY is var line getting changed by operations on var base_name? Because in most cases, variable names contain references for the sake of efficiency. To get the behavior you want, try: base_name = "" + line But this is by no means the best thing to do in a lot of cases. > Isn't > 'base_name = line' supposed to create a copy? '=' in this case seems to > be acting like an alias or something. That's because base_name is an alias or something. > BTW, is there a foreach function that automatically strips off the > newlines from line? Returning the record separators is silly. Really? How do you split the records after not providing the record separator character in the saved data? In a tab-separated database, tabs separate fields, and linefeeds separate records. Neither tabs nor linefeeds are allowed within the fields. If you remove either the tabs or the linefeeds from the database, you destroy the integrity of the database. > Currently hating Ruby, It's okay. At the moment, you don't know enough to make an informed judgment about Ruby. When you do, you will like it. -- Paul Lutus http://www.arachnoid.com