Ok. I'm feeling a bit on the silly side asking this, but for the life of me, I can't figure this out. I'm trying to run an existing program from a web interface and simply return the output to a browser. Here's the code (read: mess):
#!/usr/local/bin/perl -w
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use diagnostics;
my $query = new CGI;
print $query->header,
$query->start_html ( -title => "Tape Pull Process Tool" -bgcol
+or => "ffffff" ),
$query->h1 ("Process Tape Pulls" ),
$query->hr;
&print_prompt($query);
&vmquery($query);
&makeEnd($query);
sub print_prompt {
my ($query) = @_;
my $cmd = "/opt/openv/volmgr/bin/vmquery -m $mediaID";
print $query->start_form;
print $query->p("Beginning: Date & Time"),
$query->textfield (
-name=>"from",
-size=>22,
-maxlength=>19
);
print $query->p("End: Date & Time"),
$query->textfield (
-name =>"to",
-size =>22,
-maxlength=>19
);
print $query->p("Tape ID"),
$query->textfield (
-name=>"mediaID",
-action = "$cmd",
-size =>25,
-maxsize =>25
);
print " \@mitre.org";
print "<p>", $query->reset;
print $query->submit('action','submit');
print $query->end_form;
print <hr>;
}
sub makeEnd {
my ($query) = @_;
print $query->end_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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.