5 open - perl pragma to set default disciplines for input and output
9 use open IN => ":any", OUT => ":utf8"; # unimplemented
13 NOTE: This pragma is not yet implemented.
15 The open pragma is used to declare one or more default disciplines for
16 I/O operations. Any constructors for file, socket, pipe, or directory
17 handles found within the lexical scope of this pragma will use the
20 Handle constructors that are called with an explicit set of disciplines
21 are not influenced by the declared defaults.
23 The default disciplines so declared are available by the special
24 discipline name ":def", and can be used within handle constructors
25 that allow disciplines to be specified. This makes it possible to
26 stack new disciplines over the default ones.
28 open FH, "<:para :def", $file or die "can't open $file: $!";
32 L<perlunicode>, L<perlfunc/"open">