Ok, so im new to the seek command. Can someone please tell me though why the following command keep putting new data to the end of the file, but NOT at the beginninag as it should do?
The code is;
open(LIST, ">>southeast.list" || die &error("Unable to open file. Reason: $!"
flock(LIST, 2);
seek(LIST,0,0);
print LIST "$town\:\:\:$return\:\:\:$vehicle\:\:\:$mobile\:\:\:$hour\:\:\:$mins\n";
flock(LIST, 8);
close(LIST);
Thanks
Andy
The code is;
open(LIST, ">>southeast.list" || die &error("Unable to open file. Reason: $!"
flock(LIST, 2);
seek(LIST,0,0);
print LIST "$town\:\:\:$return\:\:\:$vehicle\:\:\:$mobile\:\:\:$hour\:\:\:$mins\n";
flock(LIST, 8);
close(LIST);
Thanks
Andy