You need to remove the extra backslash
This code:
print "Content-type: text/html\\n\\n";
Should be this:
print "Content-type: text/html\n\n";
EDIT
Also, the first line in the script looks wrong.
#!C:\xampp\apache\bin\httpd.exe
This should be the path to Perl, not httpd.
EDIT 2
Finally, this all would have been easier for you to solve if you added these two lines after the first line in your script:
use strict;
use warnings;
And run the script on the command line with the -c -w flags to compile-check and warnings-check your script, ie perl -cw yourscript.cgi
. This will give you line numbers of errors and warnings in your script.
Altogether, your script could look like this:
#!C:\path\to\perl.exe
use strict;
use warnings;
my $command=$^V;
my $title = 'Perl Version';
print "Content-type: text/html\r\n\r\n";
print "
<html><head><title>$title</title></head><body>
<h1>$title</h1>
$command
</body></html>";