Leser: 1
10 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
sub update_my_session {
my ($nickname, $time, $customer_id, $sid);
open(SDB, "/usr/local/...") || die;
my @array = <SDB>;
close(SDB);
open(INFILE, ">/usr/local/...") || die;
flock INFILE, 1;
for (@array) {
chomp;
($nickname, $time, $customer_id, $sid) = split( /\|/, $_);
$time = time() if $sid eq $sessionid;
print INFILE "$nickname|$time|$customer_id|$sid\n";
}
flock SDB, 8;
close(INFILE);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
sub update_my_session {
open(SDB, "/usr/local/...") || die;
my @array = <SDB>;
close(SDB);
open(INFILE, ">/usr/local/...") || die;
flock INFILE, 1;
for (@array) {
chomp;
print INFILE "$nickname|$time|$customer_id|$sid\n";
}
flock SDB, 8;
close(INFILE);
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
sub update_my_session { open(SDB, "/usr/local/...") || die; my @array = <SDB>; #--------------- seek (SDB, 0, 0); #--------------- flock INFILE, 1; for (@array) { chomp; print INFILE "$nickname|$time|$customer_id|$sid "; } flock SDB, 8; close(INFILE); }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
sub update_my_session { open(SDB, "/usr/local/...") || die; my @array = <SDB>; #--------------- seek (SDB, 0, 0); #--------------- flock INFILE, 1; for (@array) { chomp; print INFILE "$nickname|$time|$customer_id|$sid "; } flock SDB, 8; close(INFILE); }
s/INFILE/SDB/g
10 Einträge, 1 Seite |