From: Mike Wilson Date: 2001-02-03T11:30:35+09:00 Subject: [ruby-talk:10299] Re: Local directory search "server" script >#! /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 ;) Thanks Mike Wilson Unix Administrator http://ruby.weblogs.com ___________________________________________________ GO.com Mail Get Your Free, Private E-mail at http://mail.go.com