http://www.perlmonks.org?node_id=887268


in reply to Re^3: How to use __DATA__ efficiently, help!
in thread How to use __DATA__ efficiently, help!

$_.=s/<--date\/\/>/$date/;

You probably meant

$_ =~ s/<--date\/\/>/$date/; ...

or just (as $_ is the default anyway)

s/<--date\/\/>/$date/; ...

s/// returns the number of substitutions made, so as you have it, you're appending that number to $_.