Next | Tie::File | 15 |
Read-only mode:
use Fcntl 'O_RDONLY'; tie @FILE, 'Tie::File', $myfile, mode => O_RDONLY;
Change the record separator string:
tie @FILE, 'Tie::File', $myfile, recsep => ";;";
Tie an open filehandle:
tie @FILE, 'Tie::File', \*STDIN, mode => O_RDONLY;
Lock the file:
use Fcntl ':flock'; (tied @FILE)->flock(LOCK_EX);
(Locking is another advantage over DB_File)
Next | . | Copyright © 2002 M. J. Dominus |