From: Clement Ow Date: 2008-06-11T11:00:06+09:00 Subject: Re: Working with arrays AzimuthDragon wrote: > I'm not an expert and I can't tell you for sure what to do here, in my > own > bot I stored file contents in a variable name and then just rewrote the > file, appending whatever I needed to the end of the variables contents > and > then writing the variable to the file. Anyways, back to my reason for > responding, aren't globals slow in Ruby? a friend of mine from > deviantART is > always nagging about not using global variables... lol. Anyone feel like > correcting him? And why are you passing in exceptions? :? > I'm using globals because i have a config file that contains all the path names and the different options that my program offers. I havent heard abt global variables being slow. I think it's still manageable on my PC.(anyway, it is gonna be run in a server during production) Exceptions are for files that I dun wanna select. For example, like i want to select all files in C:/DEL other than say, the .xls files. I wont wanna list down all the .xls files, hence the need for exceptions (my company deals with tons of files) Exceptions is used because i also want to exclude directory names as well. Robert wrote: > I pasted a solution to a this very question on May 30th (Subject "Find > files"). Didn't you see it? > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/303503 Hi Robert, I did see your solution, just didnt have the time to reply.. Btw it's a sweet solution ;) just that do u think it would be possible to incoporate multiple source paths and each source paths has an array of file_exceptions? Thanks for all your concearns! -- Posted via http://www.ruby-forum.com/.