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
In reply to Re: PerlIO, random write file access and O_CREAT (sysopen)
by tye
in thread PerlIO, random write file access and O_CREAT
by vsespb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |