Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > CGI module: getting cgi params from text file redirected to script run on the commandline

Reply
Thread Tools

CGI module: getting cgi params from text file redirected to script run on the commandline

 
 
fatted
Guest
Posts: n/a
 
      07-24-2003
I have a simple program:

#!/usr/bin/perl
use warnings;
use strict;

use CGI;

my $q = new CGI;
my @array = $q->param;
map(print($_."\n"),@array);

If I call this from the command line as:
../simple.pl < a.req

On a linux machine running 5.6.0, this prints out the parameter keys
(taken from file a.req), preceded by "(offline mode: enter name=value
pairs on standard input)".
However on a linux machine running 5.8.0, the same program and
command line, prints nothing. (No parameters found). (And doesn't
print the line "ofline mode...")

What am I missing??
 
Reply With Quote
 
 
 
 
Steve Grazzini
Guest
Posts: n/a
 
      07-25-2003
fatted <> wrote:
> On a linux machine running 5.6.0, this prints out the parameter keys
> (taken from file a.req), preceded by "(offline mode: enter name=value
> pairs on standard input)".
> However on a linux machine running 5.8.0, the same program and
> command line, prints nothing. (No parameters found). (And doesn't
> print the line "ofline mode...")
>
> What am I missing??


That's optional in newer versions of CGI.pm.

% perl -MCGI=-debug script.pl

--
Steve
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show text from text file in cgi script Ryan C. Ruby 7 02-24-2011 09:32 AM
How do I -MCPAN install and pass commandline params? usenet@DavidFilmer.com Perl Misc 1 03-06-2007 07:51 PM
run a script and supply commands from a python cgi script moishyyehuda@gmail.com Python 1 12-14-2006 05:16 PM
params v.s. @params in rails? Barry Ruby 9 09-15-2005 03:12 AM
Can We Run Localization Toolkit in Commandline ??? Manish Pansiniya ASP .Net 6 07-14-2003 11:57 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57