- or download this
open(MYFILE, ">>$myfile") || die;
flock(MYFILE, 2) || die;
print MYFILE "Cottleston Pie\n";
close(MYFILE);
- or download this
#!/usr/bin/perl
...
print "You are now in my list, $newfriend!\n"
exit;
- or download this
open(MYFILE, ">$myfile") || die;
- or download this
flock FILEHANDLE, OPERATION
- or download this
sub LOCK_SH { 1 } ## shared lock
sub LOCK_EX { 2 } ## exclusive lock
sub LOCK_NB { 4 } ## non-blocking
sub LOCK_UN { 8 } ## unlock
- or download this
#!/usr/bin/perl
...
print "You are in my list, $newfriend!\n"
exit;
- or download this
flock(MYFILE, 1);
- or download this
flock(MYFILE, 2);
- or download this
open(MYFILE, "+< $myfile") || die;
- or download this
seek(MYFILE, 0, 0); truncate(MYFILE, 0);