From: Brian Candler Date: 2003-07-11T06:26:13+09:00 Subject: Re: Ruby T-Shirt Idea On Thu, Jul 10, 2003 at 03:26:14PM +0900, Daniel Carrera wrote: > Okay, so we agree on: > > re = ARGV.shift; > ARGF.each{|x| puts x if x =~ /#{re}/} Incidentally, you could make it more efficient by building the regex only once: re = /#{ARGV.shift}/ ARGF.each{|x| puts x if x =~ re} Regards, Brian.