From: Nobuyoshi Nakada Date: 2002-04-24T17:55:27+09:00 Subject: Re: My First Time Hi, At Wed, 24 Apr 2002 17:29:05 +0900, Thorsten Haude wrote: > Because Ruby has a lot of qualities that are quite different from > other languages, I would like to ask you to have a look over my > program and tell me where I break conventions or what else could be > done better. It's a fortune clone. > > - - - Schnipp - - - > #! /usr/bin/ruby -w > > fileName = "/home/yooden/.mail/keywords"; > sigDivider = '~###~' If you want to split the file by exact "~###~" lines, sigDivider = "~###~\n" sigs = IO.readlines(fileName, sigDivider).each {|s| s.chomp!(sigDivider) } print sigs[rand(sigs.size)] -- Nobu Nakada