Hi, my web page for the user to upload the code is as below:

#!/usr/bin/perl -w use CGI qw/:standard/; use CGI::Carp qw/fatalsToBrowser warningsToBrowser/; use CGI::Session ( '-ip_match' ); my $session = CGI::Session->load(); #my $sid = $cgi->cookie("CGISESSID") || undef; #my $session = new CGI::Session(undef, $sid, {Directory=>'/tmp'}); if($session->is_empty){ print redirect('index.cgi'); } elsif($session->is_expired){ print redirect('index.cgi?status=expired'); } else{ print "Content-type: text/html\n\n"; print <<EOD; <html> <head> <title>NTU Earth Observatory Station</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1 +"> <link rel="stylesheet" href="/css/styles.css" type="text/css"> </head> <body bgcolor="#999999" leftmargin="0" topmargin="0" marginwidth="0" m +arginheight="0"> <form name="frmHome" method="POST" action="upload.cgi" enctype="multip +art/form-data"> <table width="780" cellspacing="0" cellpadding="0" border="0" align="c +enter"> <tr> <td height="100"> <img src="../imgs/banner.jpg" width="100%" height="100%"></td> </tr> </table> <table width="780" cellspacing="0" cellpadding="0" border="0" align="c +enter"> <tr> <td bgcolor="#CCCCCC" height="250" valign="top" width="160"> <table width="160" cellspacing="0" cellpadding="8" border="0"> </table> </td> <td bgcolor="#eeeeee" height="250" valign="top"> <table width="610" cellspacing="10" cellpadding="0" align="cente +r" border="0"> <tr> <td valign="top" class="text"> <div><p>File to Upload: <input type="file" name="file" / +></p></div> <div align="right"><p><input type="submit" name="submit" + value="Submit" /></p></div> </td> </tr> </table> </td> </tr> </table> <table width="780" cellspacing="0" cellpadding="0" height="40" border= +"0" align="center"> </table> </form> </body> </html> EOD }

Thanks a lot!


In reply to Re^6: Upoading file using perl by rustybar
in thread Upoading file using perl by rustybar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.