I am trying to open a file and write something to it and read that something. I know this can be done by using several opens and closes but I would like to open the file only once. I tried something like this:
use Fcntl; sysopen(FRAMES, "./frames.txt", O_RDWR|O_CREAT) or die "Cannot ope..$!";
for ($i=1; $i<=7000; $i++) { print FRAMES "$i\n"; } while (<FRAMES>) { if (/\d/) { print $_; } }
but still the $_ variable is empty: Could somebody explain me why and maybe give me a suggestion how could I do that?
Thanks a lot,
Best,
vlad
--
Vlad Cojocaru Max Planck Institute for Biophysical Chemistry Department: 060 Am Fassberg 11, 37077 Goettingen, Germany tel: ++49-551-201.1327 e-mail: [EMAIL PROTECTED]
home tel: ++49-551-9963204
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]