in reply to Perl dont write my data base

Mr. Muskrat mentioned the part about changing your $path = "C:\Program Files..." to use forward slahes instead of backslahes, and that's the best advice. If you really want to use your windows-formatted paths, use single quotes instead, so that your backslahes aren't taken to mean a special character. But, forward slahes look much better, and don't worry: perl is smart enough to always (I can't think of any exceptions, though there may be one or two), change the forward-slashes to backslashes in system calls.

I create a perl script (over Windows XP platform) ... #!/usr/bin/perl
Okay, I know that windows uses file associations over actually executing the shebang line (in most cases), but you should probably be using something like "#!c:/perl/bin/perl -w" as your first line (or wherever you have perl installed). Also note the use of the '-w' switch. It will make your life easier (though 'use strict' is even more life-saving, so you should probably add that one as well).

if ($ENV{'REQUEST_METHOD'} eq 'GET') { $buffer = $ENV{'QUERY_STRING'}; } else { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } # Break em up into a format the script can read @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/e +g; $FORM{$name} = $value; }
{sigh}. I don't know who ever wrote this snippet, as I've seen it many many times. Put simply, it's ugly. I can rewrite that chunk of code with 2 lines:
use CGI ':standard'; my %FORM = CGI->Vars;
'perldoc CGI' for more info on this. Then there's the thing with 'path\textNX.txt', another monk has already clued you in on this one.

Summary/Revision:

  1. '/' not '\'
  2. -w or 'use warnings;'
  3. 'use strict;'
  4. 'perldoc CGI;'