The markup for code here is <code> ... </code> not [script] ... [/script].
could simply add open ($log, '>>','log.$client_ipnum.txt') or something in those lines?
Yes. Kinda :). The value of the variable $client_ipnum with not be substituted (interpolated) into a string that uses single quote (') delimiters. So, the way you have it now, the file opened would still have the same name every time: log.$client_ipnum.txt.
To get the effect you want, you will need to use double quotes for the string:
open ($log, '>>', "log.$client_ipnum.txt" )
That will make your filenames something like:
log.62.123.1.100.txt
log.168.0.0.123.txt
I point this out to make sure that is what you intended?
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|