in reply to cgi-lib.pl

What did I do wrong.
You tried to use cgi-lib.pl an ancient, long-abandoned, dangerous module that used to be used by people who didn't know any better. Instead use CGI, which has a cgi-lib compatability mode in case you have scripts that work with the old style.

Replies are listed 'Best First'.
Re^2: cgi-lib.pl
by ysth (Canon) on Jun 16, 2005 at 01:55 UTC
    You are blithely assuming perl 5 :)
Re^2: cgi-lib.pl
by Anonymous Monk on Jun 16, 2005 at 02:08 UTC
    This is the code for the script
    #!/usr/bin/perl require("cgi-lib.pl") print &PrintHeader; &ReadParse(*form_data); print qq|<HTML><HEAD><TITLE>Reverse Script</TITLE></HEAD> <BODY BGCOLOR="FFFFFF" TEXT="000000"> <!--start of data-->\n|; $original = $form_data{'originalstring'}; $reverse = "$original"; $original2 = $form_data{'originalstring2'}; $reverse2 = "$original2"; $original3 = $form_data{'originalstring3'}; $reverse3 = "originalstring3"; } if ($form_data{'javacgibridge'} eq "on") { print "$reverse~|~$reverse2~|~$reverse3~|~~|~\n"; } else { # javacgibridge is not on print "This is the original string:<P>"; print "$original\n"; print "<P>"; print "This is the reversed string:<P>"; print "$reverse"; print "<P>"; } print "<!--end of data--> </BODY></HTML>\n";
    Thanks
      You need, at a minimum to to replace these three lines:
      require("cgi-lib.pl") print &PrintHeader; &ReadParse(*form_data);
      with:
      use CGI; print CGI::header(); my %form_data = CGI::Vars;
      But I'm not sure I'm doing you a favor by telling you that. You really should start by learning something about perl and CGI. Just copying scripts and code snippets is likely to get you into trouble.
A reply falls below the community's threshold of quality. You may see it by logging in.