See the documentation on seek, which has an example of how to "tail" a file:
for (;;) { for ($curpos = tell($fh); $_ = readline($fh); $curpos = tell($fh)) { # search for some stuff and put it into files } sleep($for_a_while); seek($fh, $curpos, 0); }
You will either set $/ to your record size so that readline does its magic or simply read your records yourself instead of using readline.
In reply to Re: Parsing binary file during update
by Corion
in thread Parsing binary file during update
by Mnementh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |