[comp.lang.perl] $` is gone in s///;

utashiro@sran84.sra.co.jp (Kazumasa Utashiro) (03/27/91)

Is this a bug or new spec?

#!/usr/local/bin/perl
$_="superlative superlunary\n";
s/perl/&c($`,$&,$')/ge;
sub c {
	local($l, $c, $r)=@_;
	print $l, $c, $r;
	$c;
}
__END__

perl4.000 produces:

	perlative superlunary
	perlunary

perl3.044 produces:

	superlative superlunary
	superlative superlunary

---
K. Utashiro
utashiro@sra.co.jp