You may also want to use flock depending on your applications.#!perl -w use strict; my $filename = "notes.txt"; if (-e $filename) { open NOTES, '+< ' . $filename or die "Cant open $filename: $!\n"; } else { open NOTES, '+> ' . $filename or die "Cant open $filename: $!\n"; } print NOTES "foo\n"; seek NOTES, 0, 0; $data = <NOTES>; print $data;
In reply to Re: File Access
by repson
in thread File Access
by dmckee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |