On Thu, Jul 10, 2003 at 12:38:10PM +0900, Hal E. Fulton wrote:
> > What can we use that demonstrates something that Ruby's uniquely
> > useful for in 4 lines or less?
> 
> Hmm, there's the classic "grep in four lines." Can't recall 
> exactly how it looks -- I think it used a perlism that I'm
> not used to.

What about 

require 'English'
re = ARGV.shift
$DEFAULT_INPUT.each{|x| puts x if x =~ /#{re}/}

??

It's two lines if you use '$<'...

-- 
 _           _                             
| |__   __ _| |_ ___ _ __ ___   __ _ _ __  
| '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ 
| |_) | (_| | |_\__ \ | | | | | (_| | | | |
|_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_|
	Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

Linux: because a PC is a terrible thing to waste
	-- ksh / cis.ufl.edu put this on Tshirts in '93