From: schuerig@... (Michael Schuerig) Date: 2001-02-03T23:10:02+09:00 Subject: [ruby-talk:10306] Re: Local directory search "server" script Mike Wilson wrote: > >#! /usr/bin/ruby -w > > > >require 'cgi' > > > > > >def main > > @myname = File.basename($0) > > @searchprog = "agrep -clr" > > @hits = {} > > @totalocc = 0 > > > > ==Possible stupidity disclaimer ;) > I've never seen instance variables used in a non-OO program yet, do you do > that because you create a main method and you want those visible through > the whole file while still being able to define them within your method? I > would've expected $myname, etc, but the @ took me by suprise ;) It's not meant to be clever, it's just the first thing that occurred to me... Michael -- Michael Schuerig mailto:schuerig@acm.org http://www.schuerig.de/michael/