NAME

PerlIO::excl - Creates a file only if it doesn't exist

SYNOPSIS

open my $io,  '+< :creat :excl', $file;

DESCRIPTION

PerlIO::excl appends O_EXCL to the open flags.

When you'd like to create a file only if it doesn't exist before, you can use the :excl layer and the :creat layer with an open mode '<' or '+<'.

SEE ALSO

PerlIO::Util.

PerlIO::creat.

"sysopen" in perlfunc.

AUTHOR

Goro Fuji <gfuji (at) cpan.org>

LICENCE AND COPYRIGHT

Copyright (c) 2008, Goro Fuji <gfuji (at) cpan.org>. Some rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.