1. Which distro and version ?
2. Both Linux & Perl are case sensitive(!), so
Code:
#!/usr/bin/perl -w
use strict;
print "Content-Type: text/html\n\n";
open(FILE, '>', '/info/info.txt') or die "Can't open /info/info.txt: $!\n";
print FILE "vihtori\n";
close(FILE) or die "Can't close /info/info.txt: $!\n";
notice the differences between my code and yours. You certainly can't open 'File' and print/close 'FILE';
Best practice is 'or' not '||' for this situation. Use '||' inside if() statements.
3. You need to clarify the ownerships ans permissions on the script and the target file. Please post them eg using ls -l.
4. If you are using Redhat/Centos/Fedora (possibly others) there may be an SELinux issue as well.
Try
ls -Z
on both files as well.