
Tim Mousel
Deleted
Jun 4, 2000, 2:14 PM
Post #1 of 1
(1254 views)
|
BUILT IN in-place editing?
|
Can't Post
|
|
Hi, For a membership script I'm trying to remove expired accounts. $membershiplength = 30; $expires = time() + (86400 * $membershiplength); $current = time(); Here is the format of my data file: $username:$password:$pass:$trans:$email:$expires:$date I can't figure out how to delete the expired accounts from my file. I'm thinking something like the following but I think I'm way off: sub delete_expired { use Fcntl ':flock'; # for LOCK_EX open PASS, "<$password_file" | | &error('System Error. Password file was not able to be read.'); flock PASS, LOCK_EX; $_ = do { local $/, <PASS> }; $expired = ???????? #print PASS; close PASS; exit; } } Any suggestions would be greatly appreciated! Tim
|