CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
quick! someone tell me if this will work!

 



quang
Deleted

Jan 8, 2001, 12:25 PM

Post #1 of 1 (259 views)
quick! someone tell me if this will work! Can't Post

the script will be called "stat.cgi", heres the code for it:

#!/usr/bin/perl


use CGI qw(param);
$gnm=param(gnm); #Grabs form data named "gnm" and sets to $gnm
$gmb=param(gmb); #Grabs form data named "gmb" and sets to $gmb

chomp($gnm); #removes a trailing record separator from a string
chomp($gmb); #removes a trailing record separator from a string


open (the_file, " > $gnm")|| die $!; #Now, Moving on the opening the new file
print the_file "$gmb"; #Prints the string to the file
close(the_file); #close the file


now, i want the code to create a file and input some info, the file name will be

$gnm

and the info will be

$gmb

the script will be executed like this:

www.url.com/cgibin/stat.cgi?gnm=NAME&gmb=INFO


will what work?


i will chmod the folder to 777 and the stat.cgi to 755!


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives