in reply to How to get post parameters and print/log them in Perl
I use this on a couple of my CGI scripts... I just use sed thus in the perl code:
`sed -i '1i $var1 $var2 $var3' /path/to/log/log.txt`;If you use this, the file MUST not be empty to start with, so I just put at the top the date the log was created. It also adds the new entry at the top.
Nick
P.S. ummm, for some reason the code tags fail here...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to get post parameters and print/log them in Perl
by marto (Cardinal) on Nov 11, 2016 at 15:04 UTC | |
by Linicks (Scribe) on Nov 11, 2016 at 15:36 UTC | |
by marto (Cardinal) on Nov 11, 2016 at 15:49 UTC | |
by Linicks (Scribe) on Nov 11, 2016 at 16:09 UTC | |
by marto (Cardinal) on Nov 11, 2016 at 16:15 UTC | |
| |
|
Re^2: How to get post parameters and print/log them in Perl
by Anonymous Monk on Nov 15, 2016 at 08:02 UTC | |
|
Re^2: How to get post parameters and print/log them in Perl
by Anonymous Monk on Nov 15, 2016 at 07:48 UTC |