in reply to PerlIO, random write file access and O_CREAT
There is sysopen:
use Fcntl qw< O_CREAT O_RDWR >; sysopen my $fh, $filename, O_CREAT()|O_RDWR(), 0666 or die "Can't open $filename: $!\n";
(Note that your code still unconditionally truncates the file each time.)
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: PerlIO, random write file access and O_CREAT (sysopen)
by vsespb (Chaplain) on May 29, 2013 at 15:46 UTC | |
by tye (Sage) on May 29, 2013 at 15:58 UTC | |
by vsespb (Chaplain) on May 29, 2013 at 15:59 UTC |