use strict;
open(IN,"page.html");
$/ = undef;
my $content = ;
close(IN);
print "size: ". length($content) ."\n";
# either of the two regexp cause seg fault!
# $content =~ s/^Set-Cookie: .*$//mgi; # CORE DUMP
# Also trying to remove the /g option here.
# Still core dumps.
# $content =~ s/^Set-Cookie: .*$//mi; # CORE DUMP
# these work fine though...
$content =~ s/^Cache-Control: .*$//mi; # OK
print "Done.\n";
####
size: 67877
Segmentation fault (core dumped)