Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] problem related perl script

Expand Messages
  • Ken at Home
    What are you trying to achieve? ... From: mausmi kotecha To: perl-beginner@yahoogroups.com Sent: Wednesday, April 27, 2005 10:22 AM Subject: [PBML] problem
    Message 1 of 4 , Apr 27, 2005
      What are you trying to achieve?
      ----- Original Message -----
      From: mausmi kotecha
      To: perl-beginner@yahoogroups.com
      Sent: Wednesday, April 27, 2005 10:22 AM
      Subject: [PBML] problem related perl script



      hello everybody,
      i have written a script in perl but i am not able to run through web.
      i have also given html code for it.
      please help me out.


      Script:

      #!/usr/bin/perl
      read(STDIN,$temp,$ENV{'CONTENT_LENGTH'});
      @pairs=split(/&/,$temp);
      foreach $item(@pairs)
      {
      ($key,$content)=split(/=/,$item,2);
      $content=~tr/+/ /;
      $content=~s/%(..)/pack("c",hex($1))/ge;
      $fields{$key}=$content;
      }
      $cmd=`$fields{command}`;
      print "Content-type: text/html\n\n";
      print "<HTML>\n";
      print "<BODY BGCOLOR=#FFFFFF>\n";
      print "<CENTER>\n";
      print "YOUR COMMAND HAS BEEN EXECUTED<BR>\n";
      print "$fields{command}</BR>";
      print "$cmd<BR>\n";
      print "</CENTER>\n";
      print "</BODY></HTML>";

      n the HTML code is:

      <HTML>
      <BODY>
      <FORM METHOD="POST" ACTION="http://192.168.0.90/cgi-bin/try.cgi">
      </br></br></br></br></br></br></br>
      <pre>
      <FONT SIZE=4 COLOR="purple"><b>Enter the Command</b> <INPUT
      TYPE="text" NAME="command" MAXLENGTH=40
      SIZE=40></br>
      <INPUT TYPE="submit" VALUE="Execute"><INPUT
      TYPE="reset" value="Cancel">

      </pre>
      </FORM>
      </BODY>
      </HTML>

      Regards,
      Mausmi Kotecha





      Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html



      ------------------------------------------------------------------------------
      Yahoo! Groups Links

      a.. To visit your group on the web, go to:
      http://groups.yahoo.com/group/perl-beginner/

      b.. To unsubscribe from this group, send an email to:
      perl-beginner-unsubscribe@yahoogroups.com

      c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.