hello.

we have perl installed on vms and i'm trying to get my html form field
parser to work. i've been using the following form parser on unix
without a problem (different path to interpreter).

#!lardat4disk:[perl]

print "Content-type: text/html\n\n";

$contentLength=$ENV{'CONTENT_LENGTH'};
   read(STDIN,$formData,$contentLength);

foreach $pair(split(/&/,$formData)){
        # for each pair, split $key (name) and $value variables;
        ($key,$value)=split(/=/,$pair);
        # get rid of the pesky %xx encodings;
        $key=~ tr/+/ /;
            $key=~ s/%([\da-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
        $value=~ s/%([\da-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
            $value=~ tr/+/ /;
        # use the $key as an index for $parameter hash table, $value as the
value;
        $parameters{$key}=$value;
}

since we're on vms, i've changed the read line to the following

read(SYS$INPUT,$formData,$contentLength);

here is the error

Missing comma after first argument to read function at test_parser.pl
line 6, near "$contentLength)"
Execution of test_parser.pl aborted due to compilation errors.
%SYSTEM-F-ABORT, abort

i am assuming that SYS$INPUT on vms is analogous to STDIN on unix.i
think i need to mask the $ character in SYS$INPUT.

any suggestions?

thanks,

nick

Reply via email to