duff@cbi.tamucc.edu wrote > Interesting. I've never expected $1 et alia to be lexical and I've > always treated them as equivalent to "volatile" as in C. Their values > can change at any time, if you need to keep them around for any > reason, store them somewhere. I've never expected them to be lexical, if only because they're explicitly defined to be localised. So code like the following "does the right thing": sub doit { print "$1\n" }; 'abc' =~ /(b)/; doit(); Not that I've ever had any desire to write any such code. Having $1 and co as lexicals would undoubtedly be "better", but the compatibility issues would have to be addressed. Mike GuyThread Previous | Thread Next