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. Advertisements

  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. Advertisements

  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. Advertisements

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:
    27,192
    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:
    1,045
    Dan Pop
    Jun 21, 2004
  3. praba kar

    Python-cgi or Perl-cgi script doubt

    praba kar, Jul 30, 2005, in forum: Python
    Replies:
    1
    Views:
    1,128
    Michael Sparks
    Jul 30, 2005
  4. excord80
    Replies:
    17
    Views:
    1,123
    J Kenneth King
    Jan 29, 2009
  5. Ben
    Replies:
    2
    Views:
    1,741
    jacob navia
    Aug 29, 2009
  6. Terry Cooper
    Replies:
    7
    Views:
    614
    Janos Sebok
    Jun 9, 2009
  7. kath
    Replies:
    4
    Views:
    1,136
    J. Gleixner
    Apr 9, 2007
  8. Stefano Sabatini
    Replies:
    6
    Views:
    559
    Stefano Sabatini
    Jul 29, 2007
Loading...