From: Paul Melis Date: 2002-12-01T00:58:59+09:00 Subject: Re: Scope of regex match $variables "Martin DeMello" wrote in message news:Qd3G9.10876$Qr.203053@news3.calgary.shaw.ca... > returns "ell" and nil. Is there any way to make the value of $1 persist > when the function returns? From the Pickaxe book: "$1 to $9 - String - The contents of successive groups matched in the last successful pattern match. In "cat" =~/(c|a)(t|z)/, $1 will be set to ``a'' and $2 to ``t''. This variable is local to the current scope." Looks like you have to save them explicitly yourself. Paul