in reply to How do I create a file based on a variable?

So, there are a few problems. You may want to read up on open to see how to open a file handle to a file for reading, writing, or both. You may want to open the file in "<+" mode, if you want to read and write to the same file.

I don't see you writing to the file anywhere ... I expect to see something like this (assuming you have opened the file for writing):

print USF "$timestamp\n";

Personally, I would probably store the last timestamp for each user in a relational database table, and then query the table each time I saw that user, to see if they are within the threshold.


No good deed goes unpunished. -- (attributed to) Oscar Wilde

Replies are listed 'Best First'.
Re^2: How do I create a file based on a variable?
by Bennco99 (Acolyte) on Aug 03, 2006 at 14:39 UTC
    Sorry, I did not include the whole script.
    Right now I can get all $user's and their respective timestamps to the TEST log. But wanting it to create the user_status.$user file to collect on them individually.
    I will look into the open command in more detail.