Adult chat adelaide - Perl open updating file in place
Note that if layers are specified in the three-argument form, then default layers stored in $ (see perlvar; usually set by the open pragma or the switch ) are ignored.
As a shortcut a one-argument call takes the filename from the global scalar variable of the same name as the filehandle: The scalars for in-memory files are treated as octet strings: unless the file is being opened with truncation the scalar may not contain any code points over 0x FF.
Opening in-memory files can fail for a variety of reasons. The mode you specify should match the mode of the original filehandle.
Perl will attempt to flush all files opened for output before any operation that may do a fork, but this may not be supported on some platforms (see perlport).
To be safe, you may need to set $ ( method of IO:: Handle on any open handles.
In that case the default layer for the operating system (:raw on Unix, :crlf on Windows) is used.