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


in reply to Re^4: capturing STDOUT
in thread capturing STDOUT

Here's your problem:

print "Content-type: application/vnd.ms-excel\n"; #print "Content-Disposition: attachment; filename=$filename\n\n";

HTTP headers need to end in a double line break. Your Content-Type header has only one. Your Content-Disposition header would do the trick, but it's commented out.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'