in reply to Re: cgi-lib.pl
in thread cgi-lib.pl

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

Replies are listed 'Best First'.
Re^3: cgi-lib.pl
by jZed (Prior) on Jun 16, 2005 at 02:16 UTC
    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.