Hello I am dealing with a strange substitution error, when doing subsitutions inside the evaluation portion of another substitution. I have this small test: -INPUT------------------- $rules = <<EOS; RULES foo bar ENDRULES RULES foo bar ENDRULES EOS $rules =~ s{^RULES\n(.*?)^ENDRULES}{ my $c = $1; $c =~ s/\n$/ARGH/; print ">>$c<<\n\n"; }gems; -EOF-------------------------- When running this, the first block of RULES get replaced correctly (the last newline from the block is substituted), and the output will be: >>foo barARGH<< For the second block, the newline at the end of the string will patch right in the blank line, outputting: >>fooARGH bar << It seems that this bug was fixed for 5.10.0, but still fails under perl 5.8.9RC1. If this is a bug (it seems to me, but I might be wrong, wouldn't be the first time), let me know if there is a workaround. Thanks Alberto -- Alberto Simões - Departamento de Informática - Universidade do Minho Campus de Gualtar - 4710-057 Braga - PortugalThread Next