I am actually a VB/Java programmer, so am very new to Perl. This code was done by a friend, but he insists that there is nothing wrong, since other users are working. But if that is the case, then it shouldn't have the error in Fiddler. I am really at wits end for this.

This code was done by a friend, but he insists that there is nothing wrong,

Well, aside from the notes by JavaFan, the code is broken. It makes assumptions about the value of $data, and the big mistake, it trusts the user not to be malicious.
The value of $data can vary from browser to browser.
My first link and the links it links, deal with this in some detail. Read it.

By the way, how does code printing headers looks like?

Read my links, there are at least 3 examples, and they all contain the word "header"