in reply to File Access

Here's all the syntax you need if you don't want to close the file in between read and write, look up the funtions in your perl documentation if need be.
#!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;
You may also want to use flock depending on your applications.