T. Onoma wrote: > On Saturday 06 December 2003 08:29 pm, Hal Fulton wrote: > >>#!/usr/bin/ruby >> (treat as normal code) >>__FOO__ >> (execute only if this is the main file, not >> a required/loaded file) >>__END__ >> (any data) >> >> >>where FOO is some marker, either MAIN or TEST >>or something else. >> >>Better? > > > So you're just suggesting that __FOO__ be effectively the same as > > if $0 == __FILE__ > ... > end > > Yes? Yes. No difference in function, just a little prettier/clearer and no need to indent or to remember the closing end. Hal