Go Back   CodingForums.com > :: Server side development > Perl/ CGI

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-17-2002, 04:24 PM   PM User | #1
Charl
New Coder

 
Join Date: Jun 2002
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Charl is an unknown quantity at this point
Text retrival

Hello

K, i'm seeking advice in finding a script to store anything sent to it, preferably text files.....ive searched all over the place, ive come across form handlers...ect..but not one that will store all text sent to it (like a database or whatever)...i'm well new at perl by the way...


sub getCookies {

local(@rawCookies) = split (/; /,$ENV{'HTTP_COOKIE'});
local(%cookies);

foreach(@rawCookies){
($key, $val) = split (/=/,$_);
$cookies{$key} = $val;
}

return %cookies;
}


this is used for cookies is it not....how would i change it for text files ?

thanks
Charl is offline   Reply With Quote
Old 06-17-2002, 05:55 PM   PM User | #2
Feyd
Regular Coder


 
Feyd's Avatar
 
Join Date: May 2002
Location: Los Angeles, CA Maxim: Subvert Society
Posts: 404
Thanks: 0
Thanked 0 Times in 0 Posts
Feyd is an unknown quantity at this point
It's a bit too complex to post code for you, so I'm just going to point you in the write directions:

http://tech-concepts.com/scripts/
http://www.ezscripting.com/scripts/csvform.html
http://freeware.oveas.com/ofh/
__________________
Moderator, Perl/CGI Forum
shadowstorm.net - subvert society
Feyd is offline   Reply With Quote
Old 06-17-2002, 08:37 PM   PM User | #3
sir pannels
Regular Coder

 
Join Date: Jun 2002
Posts: 905
Thanks: 23
Thanked 5 Times in 5 Posts
sir pannels is an unknown quantity at this point
if you just want info going to a txt file chuck this in your script
open (FILE, ">>whatever.txt") || die "coundnt open file file";
print FILE"stuff you want in it\n";
and if you want to send stuff form a form use varibles like...
print FILE "$name $email etc \n";
remeber you need to declare the variables at the begining of the script.
that help?
sir p
sir pannels is offline   Reply With Quote
Old 06-20-2002, 02:33 AM   PM User | #4
Charl
New Coder

 
Join Date: Jun 2002
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Charl is an unknown quantity at this point
Yes i'm getting their now....

thanks for the help guys....
Charl is offline   Reply With Quote
Old 06-21-2002, 12:52 AM   PM User | #5
sir pannels
Regular Coder

 
Join Date: Jun 2002
Posts: 905
Thanks: 23
Thanked 5 Times in 5 Posts
sir pannels is an unknown quantity at this point
no prob..thats good to hear
sir pannels is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

Forum Jump


All times are GMT +1. The time now is 06:03 AM.


Advertisement
Log in to turn off these ads.