From one of your follow up posts, it sounds like you're getting the desired output (HTML) regardless of the content of the $body variable. If that's the case, this is probably not a perl issue, but a Browser/Server problem as Joost mentions
Comment on Re^2: Style Sheet Doesn't Display Styles
You may be correct...Except that I created a .htm page and ran it on the same server in the same folder location as the Perl script, pointing to the same css file, and it functions properly. If it is a Browser/Server problem, shouldn't that fail as well?
Since it only fails using Perl, I suspect something perlish...
...but you may be right. How could I tell for sure?