The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Pulling Input from HTML into Shell mosammey Shell Programming and Scripting 1 02-17-2008 10:02 PM
Using Perl to add hyperlink to html files Raynon Shell Programming and Scripting 17 11-01-2007 05:03 AM
HTML parsing by PERL avik1983 Shell Programming and Scripting 3 02-23-2007 09:25 AM
perl and html marcpascual Shell Programming and Scripting 8 09-21-2005 07:47 PM
Passing FORM(HTML) variable to ksh douknownam Shell Programming and Scripting 1 02-25-2005 04:50 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 02-11-2005
douknownam douknownam is offline
Registered User
  
 

Join Date: May 2004
Posts: 35
Perl: Variable input via HTML

I am completely new to perl and am just going over the tutorials right now. What I am trying to attempt is to take the input from the HTML (in a form) and use those variables in a perl script. I've looked everywhere for a simple example on how to do this and cannot find it or do not understand what they mean. Here is what I have below:

#!/bin/perl
print "Content-type: text/html\n\n";

print <<ENDHTML;
<HTML>
<HEAD>
<TITLE>CGI Test</TITLE>
</HEAD>
<BODY>
<FORM METHOD=POST ACTION="../cgi-bin/mycgi.pl">
name: <INPUT TYPE=TEXT NAME="realname"><BR>
email: <INPUT TYPE=TEXT NAME="email"><BR>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>

ENDHTML
print "My name is: $realname\n";
print "My email is: $email\n";

Thanks in advance for any suggestions.
 

Bookmarks

Tags
regex, regular expressions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:32 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0