Click here to get back home

dump POST data to screen

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
dump POST data to screen henribaeyens 02-15-2008
Get Chitika Premium
Posted by henribaeyens on February 15, 2008, 9:41 am
Please log in for more thread options
Hello,

I'm trying to figure out a way to output, for debugging purposes, the
contents of a multipart form-data. The posted data consists of both text
type inputs and file types input. In php, one can invoke print_r($_POST)
and print_r($_FILES), how do I achieve this using perl, especially for
the $_FILES data; I can do the $_POST by parsing the query string but how
do I do it for the files?

Thanks much for any help

Henri

Posted by Gunnar Hjalmarsson on February 15, 2008, 12:16 pm
Please log in for more thread options
henribaeyens wrote:
> I'm trying to figure out a way to output, for debugging purposes, the
> contents of a multipart form-data.

print <STDIN>;

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Posted by henribaeyens on February 15, 2008, 1:39 pm
Please log in for more thread options
On Fri, 15 Feb 2008 18:16:38 +0100, Gunnar Hjalmarsson wrote:

> henribaeyens wrote:
>> I'm trying to figure out a way to output, for debugging purposes, the
>> contents of a multipart form-data.
>
> print <STDIN>;

nice guru shit!

I managed to come up with

        while(<STDIN>) {
                chomp($_);
                print "$_<br>\n";
        }

thanks


Similar ThreadsPosted
Probelm to post XML data in a loop. First time XML is posted, second time data is getting truncated. Please help. February 9, 2006, 7:01 am
how to get data from POST? November 18, 2004, 8:19 pm
LWP, Post, return data ? October 11, 2007, 10:26 pm
Accessing form POST data July 24, 2004, 10:24 pm
parsing UTF-8 chars out of POST data September 8, 2004, 11:00 am
POST data with XMLHttpRequest to CGI (Mozilla) April 30, 2005, 1:55 pm
POST data truncated in a cgi application August 10, 2006, 8:36 am
Problems with STDIN and POST data February 13, 2008, 2:00 pm
How to post back the data by selecting a value from drop down list November 20, 2006, 9:28 am
using LWP to POST data via "javascript:document.form.submit()" link January 3, 2006, 1:20 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap