develooper Front page | perl.perl5.porters | Postings from August 2000

[ID 20000804.003] heredoc in s///e replacement

Thread Next
From:
Hugo
Date:
August 4, 2000 06:31
Subject:
[ID 20000804.003] heredoc in s///e replacement
Message ID:
200008041237.NAA05096@crypt.compulink.co.uk
Trawling through old messages, I found this aside in
  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1999-01/msg01423.html

The following code gives the same results with all perls I've checked
after 5.004 up to and including bleadperl (it fails to find the end of
the heredoc in 5.004 and earlier):

crypt% ./perl -wl
$_ = "test";
s/t/<<E/eg;
  "new"
E
print
__END__
  "new"
es  "new"

crypt% 

Hugo


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About