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

F

fatted

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??
 
S

Steve Grazzini

fatted said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top