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

Discussion in 'Perl Misc' started by fatted, Jul 24, 2003.

  1. fatted

    fatted Guest

    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??
     
    fatted, Jul 24, 2003
    #1
    1. Advertising

  2. 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
     
    Steve Grazzini, Jul 25, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Manish Pansiniya
    Replies:
    6
    Views:
    506
    Natty Gur
    Jul 14, 2003
  2. =?iso-8859-1?B?QW5kcuk=?=
    Replies:
    2
    Views:
    487
    =?iso-8859-1?B?QW5kcuk=?=
    Jan 28, 2006
  3. Irishmaninusa
    Replies:
    0
    Views:
    157
    Irishmaninusa
    Sep 23, 2004
  4. Barry
    Replies:
    9
    Views:
    485
    Ara.T.Howard
    Sep 15, 2005
  5. Replies:
    1
    Views:
    141
Loading...

Share This Page