How to remove STDIN in perl CGI

Discussion in 'Perl Misc' started by James, Jan 17, 2012.

  1. James

    James Guest

    How to remove STDIN string in perl CGI (post method) once it is
    processed? Is it possible?
    The goal is, if the browser is refreshed, the STDIN string no longer
    affects the outcome.

    TIA
    James
    James, Jan 17, 2012
    #1
    1. Advertising

  2. James

    Justin C Guest

    On 2012-01-17, James <> wrote:
    > How to remove STDIN string in perl CGI (post method) once it is
    > processed? Is it possible?
    > The goal is, if the browser is refreshed, the STDIN string no longer
    > affects the outcome.


    I'm not certain what it is you mean, but it sounds like one of these may
    be the answer.

    use CGI qw/:standard -nosticky/;
    (fields don't remember their previous value)

    $query->delete('foo','bar','baz');
    clears the named parameters.

    'perldoc CGI' will help with both of these.

    If I'm wrong, please try to explain better what you mean, or, as Ben has
    said, provide an example.



    Justin.

    --
    Justin C, by the sea.
    Justin C, Jan 18, 2012
    #2
    1. Advertising

  3. James

    James Guest

    On Jan 18, 1:07 am, Justin C <> wrote:
    > On 2012-01-17, James <> wrote:
    >
    > > How to remove STDIN string in perl CGI (post method) once it is
    > > processed? Is it possible?
    > > The goal is, if the browser is refreshed, the STDIN string no longer
    > > affects the outcome.

    >
    > I'm not certain what it is you mean, but it sounds like one of these may
    > be the answer.
    >
    > use CGI qw/:standard -nosticky/;
    > (fields don't remember their previous value)
    >
    > $query->delete('foo','bar','baz');
    > clears the named parameters.
    >
    > 'perldoc CGI' will help with both of these.
    >
    > If I'm wrong, please try to explain better what you mean, or, as Ben has
    > said, provide an example.
    >
    >    Justin.
    >
    > --
    > Justin C, by the sea.


    Thanks all. I will try and let you know.
    By the way, use CGI and read(STDIN, $buffer, ...) do not seem to work
    together.
    I need to read perldoc CGI.

    James
    James, Jan 19, 2012
    #3
    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. Johnathan Doe

    peek at stdin, flush stdin

    Johnathan Doe, May 15, 2004, in forum: C Programming
    Replies:
    5
    Views:
    24,846
    Chatoyer
    May 17, 2013
  2. Charlie Zender

    Reading stdin once confuses second stdin read

    Charlie Zender, Jun 19, 2004, in forum: C Programming
    Replies:
    6
    Views:
    771
    Dan Pop
    Jun 21, 2004
  3. Ben
    Replies:
    2
    Views:
    1,328
    jacob navia
    Aug 29, 2009
  4. Terry Cooper
    Replies:
    7
    Views:
    420
    Janos Sebok
    Jun 9, 2009
  5. kath
    Replies:
    4
    Views:
    539
    J. Gleixner
    Apr 9, 2007
Loading...

Share This Page