If you can accept a fixed number of fixed sized entries you could (with appropriate locking, of course) make a ring buffer. Store the head and tail offsets as the first record and then use something along the lines of seek( RING, $rec_num * REC_SIZE() + OFFSETSIZE(), SEEK_SET() ) and sysread( RING, $buf, REC_SIZE() ) to retrieve them.
In reply to Re: Shifting the top line(s) of a file?
by Fletch
in thread Shifting the top line(s) of a file?
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |