On Fri, Jan 31, 2003 at 10:31:32AM +0900, Gavin Sinclair wrote:
> On Friday, January 31, 2003, 4:02:44 AM, Martin wrote:
> 
> > ts <decoux / moulon.inra.fr> wrote:
> >>>>>>> "M" == Martin DeMello <martindemello / yahoo.com> writes:
> >> 
> >> M>   flag = true if line =~ /^--begin--$/
> >> 
> >> 
> >>     next if 1 .. line =~ /^--begin--$/
> >> 
> >> it will begin the processing *after* the line /^--begin--$/
> 
> > Thanks! The line after --begin-- is precisely what I need.
> 
> This looks like confusing code.  Care to put it in context and give us
> a 2 minute tutorial?

Pickaxe,  224  [Ranges in Boolean Expressions]


 => a..b used in a boolean expression means the following:
 * a is evaluated; if true, set "internal state" to true
 * b is evaluated; if true, set "internal state" to false
 * if "internal state" is true, it remains so until b becomes true

so 
	1 .. line =~ re
behaves like
	true .. line =~ re
which is true until 'line =~ re'


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

Never trust an operating system you don't have sources for. ;-)
	-- Unknown source