http://qs1969.pair.com?node_id=671670


in reply to Re: Regex error when [] occurs in file..
in thread Regex error when [] occurs in file..

Thanks both---I didn't realise that $' was treated like that. Are all 'special variables' ($&, $N (N is integer)) expanded in that way too? So if you did something like:
$temp =~ m/(\[0-9\])blah$1/;
would you match
$temp = "[0-9]blah6";
rather than
$temp = "[0-9]blah[0-9]";
?
V. interesting---I assumed that special characters inside the rest of the data would be ignored..
Cheers
<--edit to make the last sentence make more sense!-->
........
Those are my principles. If you don't like them I have others.
-- Groucho Marx
.......