Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners Cgi > Re: Possible Pe...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 1422 of 1490
Post > Topic >>

Re: Possible Perl/CGI Application

by greg@[EMAIL PROTECTED] (Greg Jetter) Oct 23, 2007 at 02:11 PM

On Monday October 22 2007 6:04 pm, less33@[EMAIL PROTECTED]
 wrote:
> I'm an engineer and I need to build a web based application for a
> customer to view results of my analysis. To simplify the problem say I
> have a duct with a length, width, and height. I have 'avi' files
> showing the fluid behavior in that duct for various combinations of
> these dimensions. The analysis package I use generates movies with the
> naming convention:
>
> length_width_height.avi
>
> I want to allow the customer to specify the length, width, and height
> and view the appropriate video file. Ideally using some combination of
> radio buttons, drop downs, etc.
>
> I am experienced in Perl and have have worked with simple HTML. I was
> told CGI might be the way to go in developing such an application. My
> question is, does that seem reasonable? I don't want to throw myself
> into learning CGI if I'm going to reach a point a few weeks down the
> road when I realize I should have taken a different approach.
>
> Thaks.
>
> Less

The main  reason you want to use CGI.pm is  the  OO way of  decoding 
passed 
parameters from your HTML forms.

I assume your going to let  the client page  select  or build a
combination of  
length , width , and height. Then send it to your Perl script to  run your

application via a system call and  produce your output  AVI file . Then 
you  
can again use  functions in the CGI.pm module to  push back  the resulting

page. , you could do the  same thing without  CGI.pm but why would you
want 
to re invent the wheel ?

instead of  decoding  a URL produced by your form manually , you  can 
create 
a new CGI object and  then extract  the data like so

example:

use CGI;
use strict;

my $q = new CGI;

 # assuming  length is a  input field  of  some type on the form
my $length = $q->param('length');

then after you built the reply .
open the  file and print it to the browser ,  you  will need the correct
mime 
type in your header..

take a look at the docs , it's  pretty common usage of  CGI.

that should get you going

good luck

Greg Jetter 
Alaska Internet Solutions
 




 4 Posts in Topic:
Possible Perl/CGI Application
less33@[EMAIL PROTECTED]   2007-10-23 02:04:59 
Re: Possible Perl/CGI Application
noreply@[EMAIL PROTECTED]  2007-10-23 10:06:50 
Re: Possible Perl/CGI Application
damog@[EMAIL PROTECTED]   2007-10-23 11:58:06 
Re: Possible Perl/CGI Application
greg@[EMAIL PROTECTED] (  2007-10-23 14:11:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 1:46:41 CDT 2008.