$value =~ s/%0D%0A/|/g; #### print <<"END_HERE_DOC"; This will be printed END_HERE_DOC #### use strict; use Benchmark; open NUL, "> nul" or die "Cannot open nul: $!"; for ( 1 .. 4 ) { test_em(); } sub test_em { timethese (5000000, { 'print' => 'print NUL "This is one line.\n"; print NUL "This is another line\n"; print NUL "Still printing\n"; print NUL "And printing and printing\n"; print NUL "Like the stupid Battery Bunny...\n";', 'here docs' => 'print NUL <## Benchmark: timing 5000000 iterations of here docs, print... here docs: 21 wallclock secs (19.04 usr + 0.95 sys = 19.99 CPU) @ 250150.09/s (n=5000000) print: 44 wallclock secs (40.69 usr + 1.26 sys = 41.95 CPU) @ 119189.51/s (n=5000000) Benchmark: timing 5000000 iterations of here docs, print...