From: Charles D Hixson Date: 2001-09-23T02:43:52+09:00 Subject: [ruby-talk:21549] Re: Replacement for __FILE__ == $0 On Friday 21 September 2001 06:05 pm, you wrote: > ... > I am always reluctant to add new keywords or methods to > core classes. Using require 'English' (which I wasn't aware > of) is reasonable in this case, although I would argue that > $0 is nearly useless as-is, and so should be aliased. > Having a perl background shouldn't be a prerequisite for > using Ruby. >... > Kevin ... The $0 notation isn't strictly Perl. I first encountered it when being introduced to the first edition of the Macintosh MPW. They had taken it in from Unix, but I don't think that Perl was around then. I think that they got it from grep (regular expressions). And that was just a small twist from C's command argument addressing, where the command arguments were stored in a 0 based array, with the name of the command being the first argument (i.e., arg[0]). -- Charles Hixson Copy software legally, the GNU way! Use GNU software, and legally make and share copies of software. See: http://www.gnu.org http://www.redhat.com http://www.linux-mandrake.com http://www.calderasystems.com http://www.linuxapps.com