in reply to Local variables assigned to pattern matches

The parentheses around $x in
local($x) = $y =~ /^(z*)/;
force the list context. Try:
local $x = $y =~ /^(z*)/;
instead.

--bwana147