Justin Allegakoen wrote: > > Its poor practise to keep your code in the same directory as your > data. I suggest you create a folder in C:\Perl called Programs and > then put your code in there.
Or vice versa - you don't normally put your data where your scripts reside - but that's not *always* true either. Sometimes you want everything to do with a certain procedure to reside in the same place. But that's just druthers if you catch my drift. > I've modified your code so as to use glob rather than opendirs and > readdirs. It also cuts down on the use of $_ - refer to Andy's e-mail. I personally never use glob (I have an aversion to it) and he doesn't *have* to use $_, he can always use $file or some such. The problem with glob is it operates differently on different OSs and is more obtuse just to save two lines of code that were totally self explanatory. opendir/readdir always do the same thing - regardless of OS. I try to avoid anything that is shell oriented for portability reasons - I know portability isn't always an issue, but it can't hurt - someone can always adapt it to another OS if need be. In the case of '*', that's not much of a issue as a glob. If you're going to suggest that something is better or worse, there should be overwhelming evidence to back it up rather than just a preference. Otherwise, you should work in the framework that's already present - and you know in Perl, TIMTOWTDI. JMO _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
