in reply to Re^4: How to get post parameters and print/log them in Perl
in thread How to get post parameters and print/log them in Perl

As I said, it depends on the context (i.e. HTML form drop down boxes etc.). Also, even if you did just use perl to write to file, you still need to sanitise the data first anyway, no?

So whatever method is used, all user input data needs to be sanitised before using it - I thought that was a foregone conclusion.

I once made a unicycle and taught myself to ride it :)

Nick

EDIT: Also, I just answered the question and showed one way to do it - I didn't think I needed to provide a full synopsis of how to do the whole lot!

  • Comment on Re^5: How to get post parameters and print/log them in Perl

Replies are listed 'Best First'.
Re^6: How to get post parameters and print/log them in Perl
by marto (Cardinal) on Nov 11, 2016 at 16:15 UTC

    "As I said, it depends on the context."

    You mentioned nothing of this in you reply to OP, hence my comment. Your only caveat is 'the file MUST not be empty to start with'.

    "i.e. HTML form drop down boxes etc."

    You're right, it's not like it's trivial to submit data without having selected it from a drop down, oh, wait it is...

      Cross post as I was editing - and as to drop down boxes, I still check user input anyway (always)...

      Nick