Hi,

James Ponder wrote:

> Quite often you have an input line, and you want to pull data out from it
> using a regexp.  In perl I would do the following, naming my fields without
> ever using $1, $2, etc.:
> 
>   if (($key, $val) = $var =~ /^(.+)=(.+)$/) {
>     # ...
>   }

You could try this:

var.scan(/^(.+)=(.+)$/) do |key, val|
	...
end

bye, Roman