Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters

[perl #94860] [PATCH] [DOCS] Modernize perlopentut.pod

 

 

Perl porters RSS feed   Index | Next | Previous | View Threaded


perlbug-followup at perl

Jul 14, 2011, 4:40 PM

Post #1 of 12 (113 views)
Permalink
[perl #94860] [PATCH] [DOCS] Modernize perlopentut.pod

# New Ticket Created by Mike Doherty
# Please include the string: [perl #94860]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=94860 >


This revises and rearranges perlopentut.pod to reflect more modern
usages of open. In particular, it emphasisizes the use of 3-arg
open over 2-arg, and the use of lexical filehandles (including
an explanation of terminology). It also cleans up quoting and
trailing whitespace, so you may wish to use -w to reduce the number
of changes you see.

Thanks to Matt Trout for his encouragement.
---
pod/perlopentut.pod | 339 +++++++++++++++++++++++++++------------------------
1 files changed, 181 insertions(+), 158 deletions(-)

diff --git a/pod/perlopentut.pod b/pod/perlopentut.pod
index 4bb43bf..04b4f20 100644
--- a/pod/perlopentut.pod
+++ b/pod/perlopentut.pod
@@ -7,7 +7,7 @@ perlopentut - tutorial on opening things in Perl
Perl has two simple, built-in ways to open files: the shell way for
convenience, and the C way for precision. The shell way also has 2- and
3-argument forms, which have different semantics for handling the filename.
-The choice is yours.
+You'll probably want to use the 3-argument form.

=head1 Open E<agrave> la shell

@@ -19,7 +19,7 @@ from the shell:
$ myprogram < inputfile
$ myprogram > outputfile
$ myprogram >> outputfile
- $ myprogram | otherprogram
+ $ myprogram | otherprogram
$ otherprogram | myprogram

And here are some more advanced examples:
@@ -35,97 +35,54 @@ virtually the same syntax as the shell.

=head2 Simple Opens

-The C<open> function takes two arguments: the first is a filehandle,
-and the second is a single string comprising both what to open and how
-to open it. C<open> returns true when it works, and when it fails,
-returns a false value and sets the special variable C<$!> to reflect
-the system error. If the filehandle was previously opened, it will
-be implicitly closed first.
+The C<open> function takes three arguments: the first is a filehandle,
+or a reference to a filehandle (which is preferred); the second is a
+string specifying how to open the file (for reading, writing, appending,
+etc.); the third is what file to open. Since Perl 5.6, if the argument
+specifying the filehandle is undefined, then Perl will create a
+filehandle, and put a reference to it into that argument. This is called
+a "lexical" ("my") or "indirect" filehandle. We'll call it "lexical" here.

-For example:
-
- open(INFO, "datafile") || die("can't open datafile: $!");
- open(INFO, "< datafile") || die("can't open datafile: $!");
- open(RESULTS,"> runstats") || die("can't open runstats: $!");
- open(LOG, ">> logfile ") || die("can't open logfile: $!");
-
-If you prefer the low-punctuation version, you could write that this way:
-
- open INFO, "< datafile" or die "can't open datafile: $!";
- open RESULTS,"> runstats" or die "can't open runstats: $!";
- open LOG, ">> logfile " or die "can't open logfile: $!";
-
-A few things to notice. First, the leading C<< < >> is optional.
-If omitted, Perl assumes that you want to open the file for reading.
-
-Note also that the first example uses the C<||> logical operator, and the
-second uses C<or>, which has lower precedence. Using C<||> in the latter
-examples would effectively mean
-
- open INFO, ( "< datafile" || die "can't open datafile: $!" );
-
-which is definitely not what you want.
-
-The other important thing to notice is that, just as in the shell,
-any whitespace before or after the filename is ignored. This is good,
-because you wouldn't want these to do different things:
-
- open INFO, "<datafile"
- open INFO, "< datafile"
- open INFO, "< datafile"
-
-Ignoring surrounding whitespace also helps for when you read a filename
-in from a different file, and forget to trim it before opening:
+C<open> returns true when it works, and when it fails, returns a false
+value and sets the special variable C<$!> to reflect the system error.
+You can use the L<autodie> pragma to make it die with an exception,
+if you prefer to avoid writing repetitive error-handling code yourself.

- $filename = <INFO>; # oops, \n still there
- open(EXTRA, "< $filename") || die "can't open $filename: $!";
+If the filehandle was previously opened, it will be implicitly closed
+first. This allows you to re-use the same reference rather than create
+a new one for every filehandle you require.

-This is not a bug, but a feature. Because C<open> mimics the shell in
-its style of using redirection arrows to specify how to open the file, it
-also does so with respect to extra whitespace around the filename itself
-as well. For accessing files with naughty names, see
-L<"Dispelling the Dweomer">.
+Here are some examples of the 3-argument form of open:

-There is also a 3-argument version of C<open>, which lets you put the
-special redirection characters into their own argument:
+ open(my $info, '<', 'datafile') || die("Can't open datafile: $!");
+ open(my $results, '>', 'runstats') || die("Can't open runstats: $!");
+ open(my $log, '>>', 'logfile') || die("Can't open logfile: $!");

- open( INFO, ">", $datafile ) || die "Can't create $datafile: $!";
-
-In this case, the filename to open is the actual string in C<$datafile>,
-so you don't have to worry about C<$datafile> containing characters
-that might influence the open mode, or whitespace at the beginning of
-the filename that would be absorbed in the 2-argument version. Also,
-any reduction of unnecessary string interpolation is a good thing.
+If you prefer the low-punctuation version, you could write that this way:

-=head2 Indirect Filehandles
+ open my $info, '<', 'datafile' or die "Can't open datafile: $!";
+ open my $results, '>', 'runstats' or die "Can't open runstats: $!";
+ open my $log, '>>', 'logfile' or die "Can't open logfile: $!";

-C<open>'s first argument can be a reference to a filehandle. As of
-perl 5.6.0, if the argument is uninitialized, Perl will automatically
-create a filehandle and put a reference to it in the first argument,
-like so:
+A few things to notice. The first example uses the C<||> logical operator,
+and the second uses C<or>, which has lower precedence. Using C<||> in the
+latter examples would effectively mean

- open( my $in, $infile ) or die "Couldn't read $infile: $!";
- while ( <$in> ) {
- # do something with $_
- }
- close $in;
+ open my $info, ( '<', 'datafile' || die "Can't open datafile: $!" );

-Indirect filehandles make namespace management easier. Since filehandles
-are global to the current package, two subroutines trying to open
-C<INFILE> will clash. With two functions opening indirect filehandles
-like C<my $infile>, there's no clash and no need to worry about future
-conflicts.
+which is definitely not what you want.

-Another convenient behavior is that an indirect filehandle automatically
-closes when there are no more references to it:
+When the filehandle is specified as a reference, it is a "lexical" filehandle,
+which is automatically closed when there are no more references to it:

sub firstline {
- open( my $in, shift ) && return scalar <$in>;
- # no close() required
+ open( my $in, shift ) && return scalar <$in>;
+ # no close() required
}

-Indirect filehandles also make it easy to pass filehandles to and return
-filehandles from subroutines:
+Lexical filehandles also make it easy to pass filehandles info subroutines, or
+return a filehandle from a subroutine--just pass the reference like any other
+reference:

for my $file ( qw(this.conf that.conf) ) {
my $fin = open_or_throw('<', $file);
@@ -141,31 +98,92 @@ filehandles from subroutines:
return $h;
}

+=head2 Bareword Filehandles
+
+C<open>'s first argument is normally a reference to a filehandle (a "lexical"
+filehandle), making namespace management easier:
+
+ open my $fh, '<', 'filename' or die "Couldn't open filename: $!";
+ while (<$fh>) {...} # $fh is called "lexical" ("my") or "indirect"
+
+There is another way of specifying filehandles directly--"bareword" filehandles:
+
+ open INFO, '<', 'datafile' or die "Couldn't open datafile: $!";
+ while (<INFO>) {...} # INFO is called "bareword", "direct", or "global"
+
+Since bareword filehandles are global to the current package, two subroutines
+trying to open C<INFILE> will clash. With two functions opening lexical
+filehandles like C<my $infile>, there's no clash and no need to worry about
+future conflicts. Lexical filehandles are also automatically closed when they
+fall out of scope in the same way that lexical variables are garbage-collected.
+
+Bareword filehandles are often used to refer to the standard input (C<*STDIN>),
+output (C<*STDOUT>), and error filehandles (C<*STDERR>), but you can use
+them for any filehandle if you wish.
+
+=head2 Two-Argument Open
+
+There is also an old 2-argument version of C<open>, which lets you put the
+special redirection characters and the filename into the same argument:
+
+ open(my $info, "> $datafile" ) || die "Can't create $datafile: $!";
+
+In this case, the filename to open is not a separate argument, so
+you have to worry about C<$datafile> containing characters that might
+influence the open mode, or whitespace in the second argument that wouldn't
+be a problem in the 3-argument version.
+
+Another important thing to notice is that, just as in the shell, any whitespace
+before or after the filename is ignored. This is good, because you wouldn't
+want these to do different things:
+
+ open my $info, '<datafile'
+ open my $info, '< datafile'
+ open my $info, '< datafile'
+
+Ignoring surrounding whitespace also helps for when you read a filename in from
+a different file, and forget to trim it before opening:
+
+ $filename = <$info>; # oops, \n still there
+ open(my $extra, "< $filename") || die "can't open $filename: $!";
+
+This is a feature, not a bug. Because C<open> mimics the shell in its style of
+using redirection arrows to specify how to open the file, it also does so with
+respect to extra whitespace around the filename itself as well. For accessing
+files with naughty names, see L<"Dispelling the Dweomer">.
+
+When opening a file, the leading C<< < >> is optional. If omitted, Perl assumes
+that you want to open the file for reading:
+
+ open(my $info, $datafile) || die("Can't open $datafile: $!");
+
=head2 Pipe Opens

In C, when you want to open a file using the standard I/O library,
you use the C<fopen> function, but when opening a pipe, you use the
C<popen> function. But in the shell, you just use a different redirection
-character. That's also the case for Perl. The C<open> call
-remains the same--just its argument differs.
+character. That's also the case for Perl. The C<open> call
+remains the same--just its argument differs.

If the leading character is a pipe symbol, C<open> starts up a new
command and opens a write-only filehandle leading into that command.
This lets you write into that handle and have what you write show up on
that command's standard input. For example:

- open(PRINTER, "| lpr -Plp1") || die "can't run lpr: $!";
- print PRINTER "stuff\n";
- close(PRINTER) || die "can't close lpr: $!";
+ open(my $printer, '| lpr -Plp1') || die "can't run lpr: $!";
+ print $printer "stuff\n";
+ close($printer) || die "can't close lpr: $!";

If the trailing character is a pipe, you start up a new command and open a
read-only filehandle leading out of that command. This lets whatever that
command writes to its standard output show up on your handle for reading.
For example:

- open(NET, "netstat -i -n |") || die "can't fork netstat: $!";
- while (<NET>) { } # do something with input
- close(NET) || die "can't close netstat: $!";
+ open(my $net, 'netstat -i -n |') || die "can't fork netstat: $!";
+ while (<$net>) {
+ # do something with input
+ }
+ close($net) || die "can't close netstat: $!";

What happens if you try to open a pipe to or from a non-existent
command? If possible, Perl will detect the failure and set C<$!> as
@@ -178,8 +196,8 @@ failure if Perl can't even run the shell. See L<perlfaq8/"How can I
capture STDERR from an external command?"> to see how to cope with
this. There's also an explanation in L<perlipc>.

-If you would like to open a bidirectional pipe, the IPC::Open2
-library will handle this for you. Check out
+If you would like to open a bidirectional pipe, the L<IPC::Open2>
+library will handle this for you. Check out
L<perlipc/"Bidirectional Communication with Another Process">

perl-5.6.x introduced a version of piped open that executes a process
@@ -220,7 +238,7 @@ access the standard output.
If minus can be used as the default input or default output, what happens
if you open a pipe into or out of minus? What's the default command it
would run? The same script as you're currently running! This is actually
-a stealth C<fork> hidden inside an C<open> call. See
+a stealth C<fork> hidden inside an C<open> call. See
L<perlipc/"Safe Pipe Opens"> for details.

=head2 Mixing Reads and Writes
@@ -233,13 +251,13 @@ existing one. On the other hand, using a greater-than always clobbers
if there isn't an old one. Adding a "+" for read-write doesn't affect
whether it only works on existing files or always clobbers existing ones.

- open(WTMP, "+< /usr/adm/wtmp")
+ open(my $wtmp, '+< /usr/adm/wtmp')
|| die "can't open /usr/adm/wtmp: $!";

- open(SCREEN, "+> lkscreen")
+ open(my $screen, '+> lkscreen')
|| die "can't open lkscreen: $!";

- open(LOGFILE, "+>> /var/log/applog")
+ open($logfile, '+>> /var/log/applog')
|| die "can't open /var/log/applog: $!";

The first one won't create a new file, and the second one will always
@@ -262,14 +280,14 @@ on the end:
$ perl -i.orig -pe 's/\bfoo\b/bar/g' *.[Cchy]

This is a short cut for some renaming games that are really
-the best way to update textfiles. See the second question in
+the best way to update textfiles. See the second question in
L<perlfaq5> for more details.

-=head2 Filters
+=head2 Filters

One of the most common uses for C<open> is one you never
even notice. When you process the ARGV filehandle using
-C<< <ARGV> >>, Perl actually does an implicit open
+C<< <ARGV> >>, Perl actually does an implicit open
on each file in @ARGV. Thus a program called like this:

$ myprogram file1 file2 file3
@@ -279,7 +297,7 @@ using a construct no more complex than:

while (<>) {
# do something with $_
- }
+ }

If @ARGV is empty when the loop first begins, Perl pretends you've opened
up minus, that is, the standard input. In fact, $ARGV, the currently
@@ -294,17 +312,17 @@ simple ones by hand, the Getopts modules are good for this:
use Getopt::Std;

# -v, -D, -o ARG, sets $opt_v, $opt_D, $opt_o
- getopts("vDo:");
+ getopts('vDo:');

# -v, -D, -o ARG, sets $args{v}, $args{D}, $args{o}
- getopts("vDo:", \%args);
+ getopts('vDo:', \%args);

Or the standard Getopt::Long module to permit named arguments:

use Getopt::Long;
- GetOptions( "verbose" => \$verbose, # --verbose
- "Debug" => \$debug, # --Debug
- "output=s" => \$output );
+ GetOptions( 'verbose' => \$verbose, # --verbose
+ 'Debug' => \$debug, # --Debug
+ 'output=s' => \$output );
# --output=somestring or --output somestring

Another reason for preprocessing arguments is to make an empty
@@ -329,7 +347,7 @@ Here's an example:
? '< /etc/passwd'
: 'ypcat passwd |';

- open(PWD, $pwdinfo)
+ open(my $pwd, $pwdinfo)
or die "can't open $pwdinfo: $!";

This sort of thing also comes into play in filter processing. Because
@@ -367,7 +385,7 @@ If you want the convenience of the shell, then Perl's C<open> is
definitely the way to go. On the other hand, if you want finer precision
than C's simplistic fopen(3S) provides you should look to Perl's
C<sysopen>, which is a direct hook into the open(2) system call.
-That does mean it's a bit more involved, but that's the price of
+That does mean it's a bit more involved, but that's the price of
precision.

C<sysopen> takes 3 (or 4) arguments.
@@ -413,24 +431,24 @@ but you'll get the idea.

To open a file for reading:

- open(FH, "< $path");
- sysopen(FH, $path, O_RDONLY);
+ open(my $fh, "< $path");
+ sysopen(my $fh, $path, O_RDONLY);

To open a file for writing, creating a new file if needed or else truncating
an old file:

- open(FH, "> $path");
- sysopen(FH, $path, O_WRONLY | O_TRUNC | O_CREAT);
+ open(my $fh, "> $path");
+ sysopen(my $fh, $path, O_WRONLY | O_TRUNC | O_CREAT);

To open a file for appending, creating one if necessary:

- open(FH, ">> $path");
- sysopen(FH, $path, O_WRONLY | O_APPEND | O_CREAT);
+ open(my $fh, ">> $path");
+ sysopen(my $fh, $path, O_WRONLY | O_APPEND | O_CREAT);

To open a file for update, where the file must already exist:

- open(FH, "+< $path");
- sysopen(FH, $path, O_RDWR);
+ open(my $fh, "+< $path");
+ sysopen(my $fh, $path, O_RDWR);

And here are things you can do with C<sysopen> that you cannot do with
a regular C<open>. As you'll see, it's just a matter of controlling the
@@ -439,23 +457,23 @@ flags in the third argument.
To open a file for writing, creating a new file which must not previously
exist:

- sysopen(FH, $path, O_WRONLY | O_EXCL | O_CREAT);
+ sysopen(my $fh, $path, O_WRONLY | O_EXCL | O_CREAT);

To open a file for appending, where that file must already exist:

- sysopen(FH, $path, O_WRONLY | O_APPEND);
+ sysopen(my $fh, $path, O_WRONLY | O_APPEND);

To open a file for update, creating a new file if necessary:

- sysopen(FH, $path, O_RDWR | O_CREAT);
+ sysopen(my $fh, $path, O_RDWR | O_CREAT);

To open a file for update, where that file must not already exist:

- sysopen(FH, $path, O_RDWR | O_EXCL | O_CREAT);
+ sysopen(my $fh, $path, O_RDWR | O_EXCL | O_CREAT);

To open a file without blocking, creating one if necessary:

- sysopen(FH, $path, O_WRONLY | O_NONBLOCK | O_CREAT);
+ sysopen(my $fh, $path, O_WRONLY | O_NONBLOCK | O_CREAT);

=head2 Permissions E<agrave> la mode

@@ -558,7 +576,7 @@ filename that starts with whitespace. Trailing whitespace is protected
by appending an ASCII NUL byte (C<"\0">) at the end of the string.

$file =~ s#^(\s)#./$1#;
- open(FH, "< $file\0") || die "can't open $file: $!";
+ open(my $fh, "< $file\0") || die "can't open $file: $!";

This assumes, of course, that your system considers dot the current
working directory, slash the directory separator, and disallows ASCII
@@ -571,16 +589,16 @@ use a slash. Maybe C<sysopen> isn't such a bad idea after all.
If you want to use C<< <ARGV> >> processing in a totally boring
and non-magical way, you could do this first:

- # "Sam sat on the ground and put his head in his hands.
- # 'I wish I had never come here, and I don't want to see
+ # "Sam sat on the ground and put his head in his hands.
+ # 'I wish I had never come here, and I don't want to see
# no more magic,' he said, and fell silent."
- for (@ARGV) {
+ for (@ARGV) {
s#^([^./])#./$1#;
$_ .= "\0";
- }
- while (<>) {
+ }
+ while (<>) {
# now process $_
- }
+ }

But be warned that users will not appreciate being unable to use "-"
to mean standard input, per the standard convention.
@@ -601,26 +619,32 @@ temporarily, then all you have to do is this:
open($path, "< $path") || die "can't open $path: $!";
while (<$path>) {
# whatever
- }
+ }

Since you're using the pathname of the file as its handle,
you'll get warnings more like

Some warning at scriptname line 29, </etc/motd> line 7.

+A better alternative is to use the L<autodie> pragma, which is included
+in the Perl core distribution as of v5.10.1 (and can be installed as far
+back as Perl 5.8). Autodie makes C<open> throw an exception object that
+provides excellent error messages.
+
=head2 Single Argument Open

-Remember how we said that Perl's open took two arguments? That was a
-passive prevarication. You see, it can also take just one argument.
-If and only if the variable is a global variable, not a lexical, you
-can pass C<open> just one argument, the filehandle, and it will
-get the path from the global scalar variable of the same name.
+Remember how we said that Perl's open took three or two arguments?
+That was a passive prevarication. You see, it can also take just
+one argument. If and only if the variable is a global variable,
+not a lexical, you can pass C<open> just one argument, the filehandle,
+and it will get the path from the global scalar variable of the same
+name:

$FILE = "/etc/motd";
open FILE or die "can't open $FILE: $!";
while (<FILE>) {
# whatever
- }
+ }

Why is this here? Someone has to cater to the hysterical porpoises.
It's something that's been in Perl since the very beginning, if not
@@ -640,11 +664,11 @@ failure status.
You don't have to accept the STDIN and STDOUT you were given. You are
welcome to reopen them if you'd like.

- open(STDIN, "< datafile")
- || die "can't open datafile: $!";
+ open(STDIN, '< datafile')
+ || die "Can't open datafile: $!";

- open(STDOUT, "> output")
- || die "can't open output: $!";
+ open(STDOUT, '> output')
+ || die "Can't open output: $!";

And then these can be accessed directly or passed on to subprocesses.
This makes it look as though the program were initially invoked
@@ -652,9 +676,8 @@ with those redirections from the command line.

It's probably more interesting to connect these to pipes. For example:

- $pager = $ENV{PAGER} || "(less || more)";
- open(STDOUT, "| $pager")
- || die "can't fork a pager: $!";
+ $pager = $ENV{PAGER} || '(less || more)';
+ open(STDOUT, "| $pager") || die "can't fork a pager: $!";

This makes it appear as though your program were called with its stdout
already piped into your pager. You can also use this kind of thing
@@ -665,18 +688,18 @@ just in a different process:
head(100);
while (<>) {
print;
- }
+ }

sub head {
my $lines = shift || 20;
- return if $pid = open(STDOUT, "|-"); # return if parent
+ return if $pid = open(STDOUT, '|-'); # return if parent
die "cannot fork: $!" unless defined $pid;
while (<STDIN>) {
last if --$lines < 0;
print;
- }
+ }
exit;
- }
+ }

This technique can be applied to repeatedly push as many filters on your
output stream as you wish.
@@ -694,7 +717,7 @@ just in case.

if (-l $file || ! -f _) {
print "$file is not a plain file\n";
- }
+ }

What other kinds of files are there than, well, files? Directories,
symbolic links, named pipes, Unix-domain sockets, and block and character
@@ -704,14 +727,14 @@ Not all plain files are text files. That's why there are separate C<-f>
and C<-T> file tests.

To open a directory, you should use the C<opendir> function, then
-process it with C<readdir>, carefully restoring the directory
+process it with C<readdir>, carefully restoring the directory
name if necessary:

- opendir(DIR, $dirname) or die "can't opendir $dirname: $!";
- while (defined($file = readdir(DIR))) {
+ opendir(my $dir, $dirname) or die "can't opendir $dirname: $!";
+ while (defined($file = readdir($dir))) {
# do something with "$dirname/$file"
}
- closedir(DIR);
+ closedir($dir);

If you want to process directories recursively, it's better to use the
File::Find module. For example, this prints out all files recursively
@@ -734,8 +757,8 @@ C<readlink> is called for:
print "$file points to $whither\n";
} else {
print "$file points nowhere: $!\n";
- }
- }
+ }
+ }

=head2 Opening Named Pipes

@@ -767,9 +790,9 @@ With descriptors that you haven't opened using C<sysopen>, such as
sockets, you can set them to be non-blocking using C<fcntl>:

use Fcntl;
- my $old_flags = fcntl($handle, F_GETFL, 0)
+ my $old_flags = fcntl($handle, F_GETFL, 0)
or die "can't get flags: $!";
- fcntl($handle, F_SETFL, $old_flags | O_NONBLOCK)
+ fcntl($handle, F_SETFL, $old_flags | O_NONBLOCK)
or die "can't set non blocking: $!";

Rather than losing yourself in a morass of twisting, turning C<ioctl>s,
@@ -784,8 +807,8 @@ Check out Term::ReadKey and Term::ReadLine.
=head2 Opening Sockets

What else can you open? To open a connection using sockets, you won't use
-one of Perl's two open functions. See
-L<perlipc/"Sockets: Client/Server Communication"> for that. Here's an
+one of Perl's two open functions. See
+L<perlipc/"Sockets: Client/Server Communication"> for that. Here's an
example. Once you have it, you can use FH as a bidirectional filehandle.

use IO::Socket;
@@ -814,7 +837,7 @@ handles before doing regular I/O on them:

binmode(STDIN);
binmode(STDOUT);
- while (<STDIN>) { print }
+ while (<STDIN>) { print }

Passing C<sysopen> a non-standard flag option will also open the file in
binary mode on those systems that support it. This is the equivalent of
@@ -834,7 +857,7 @@ sneaky data mutilation behind your back.

while (sysread(WHENCE, $buf, 1024)) {
syswrite(WHITHER, $buf, length($buf));
- }
+ }

Depending on the vicissitudes of your runtime system, even these calls
may need C<binmode> or C<O_BINARY> first. Systems known to be free of
@@ -897,7 +920,7 @@ if you're going to be blocking:
print "Waiting for lock...";
flock(FH, LOCK_SH) or die "can't lock filename: $!";
print "got it.\n"
- }
+ }
# now read from FH

To get an exclusive lock, typically used for writing, you have to be
@@ -974,7 +997,7 @@ The two-argument form of C<binmode> is being used, for example
For more detailed discussion about PerlIO see L<PerlIO>;
for more detailed discussion about Unicode and I/O see L<perluniintro>.

-=head1 SEE ALSO
+=head1 SEE ALSO

The C<open> and C<sysopen> functions in perlfunc(1);
the system open(2), dup(2), fopen(3), and fdopen(3) manpages;
@@ -982,7 +1005,7 @@ the POSIX documentation.

=head1 AUTHOR and COPYRIGHT

-Copyright 1998 Tom Christiansen.
+Copyright 1998 Tom Christiansen.

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


doherty at cs

Dec 14, 2011, 5:01 PM

Post #2 of 12 (100 views)
Permalink
Re: [perl #94860] [PATCH] [DOCS] Modernize perlopentut.pod [In reply to]

I think the current plan is to completely rewrite the documentation. I
believe the best effort to do so is currently
https://github.com/doherty/perl5-open-tutorial (which should really be
under https://github.com/perl-doc-cats...)

I think rewriting it is probably the only way to get sufficient
agreement for inclusion. Please feel free to help.

-Mike


tchrist at perl

Jul 3, 2012, 2:37 PM

Post #3 of 12 (77 views)
Permalink
Re: [perl #94860] [PATCH] [DOCS] Modernize perlopentut.pod [In reply to]

"Jesse Luehrs via RT" <perlbug-followup [at] perl> wrote
on Tue, 03 Jul 2012 14:10:48 PDT:

> Is anyone still working on this? I would still very much like this to
> happen, but if it has actually been abandoned, there's probably no
> reason to keep this ticket open.


I didn't care for the knee-jerk "Modern® Perl™" revisionist history
approach to opening files.

I'm not in favor of the notion that hiding the regular shell open and
regular filehandles from people is a good idea.

Basically, the spin sucked.

--tom


doherty at cs

Jul 3, 2012, 4:50 PM

Post #4 of 12 (71 views)
Permalink
Re: [perl #94860] [PATCH] [DOCS] Modernize perlopentut.pod [In reply to]

On 12-07-03 06:38 PM, tchrist1 via RT wrote:
> "Jesse Luehrs via RT" <perlbug-followup [at] perl> wrote
> on Tue, 03 Jul 2012 14:10:48 PDT:
>
>> Is anyone still working on this? I would still very much like this to
>> happen, but if it has actually been abandoned, there's probably no
>> reason to keep this ticket open.

I've been effectively warned off.

I did hear rumours of someone else taking it on, but I haven't seen any
actual work.

I don't see why the ticket should be closed - the tutorial *should* be
modernized, and until that's done, the ticket should stay open. I
appreciate Tom's reluctance to bury the useful items he mentioned, but
that's not an argument to ban revisions to the tutorial, it is an
argument to rewrite it well.

-Mike


perl.p5p at rjbs

Jul 4, 2012, 5:19 AM

Post #5 of 12 (72 views)
Permalink
Re: [perl #94860] [PATCH] [DOCS] Modernize perlopentut.pod [In reply to]

* Jesse Luehrs via RT <perlbug-followup [at] perl> [2012-07-03T17:10:48]
> Is anyone still working on this? I would still very much like this to
> happen, but if it has actually been abandoned, there's probably no
> reason to keep this ticket open.

I think this can be closed until there is a new patch.

--
rjbs
Attachments: signature.asc (0.48 KB)


tchrist at perl

Jul 4, 2012, 7:25 AM

Post #6 of 12 (71 views)
Permalink
Re: [perl #94860] [PATCH] [DOCS] Modernize perlopentut.pod [In reply to]

I disagree with your "modernize" position.

There is nothing unmodern old-fashioned -- let alone wrong -- with using
named unsigiled unautovivified filehandles and two-argument open for the
type of programs they were designed. It's a dumb witch hunt.

--tom


demerphq at gmail

Jul 4, 2012, 8:33 AM

Post #7 of 12 (71 views)
Permalink
Re: [perl #94860] [PATCH] [DOCS] Modernize perlopentut.pod [In reply to]

On 4 July 2012 16:25, Tom Christiansen <tchrist [at] perl> wrote:
> I disagree with your "modernize" position.
>
> There is nothing unmodern old-fashioned -- let alone wrong -- with using
> named unsigiled unautovivified filehandles and two-argument open for the
> type of programs they were designed. It's a dumb witch hunt.

While I respect your rights with regard to the document in question I
wish to register the fact that I disagree with the point you make
here.

Perl has moved on since you wrote this document. It has grown past the
"hacky sysadmin tool" to the main language used in multi-billion
dollar shops with hundreds of developers. The needs of the community
have moved on too. Neat hacks are no-where near as important as well
trained devs who can be hired by companies like mine. Which is good
for my company, and good for perl devs because we give them jobs.

So it is not a dumb witch hunt.

I'll ask you a question: how many perl devs are in your shop? What is
the most number of perl devs you have worked with at one time?

Yves


--
perl -Mre=debug -e "/just|another|perl|hacker/"


tchrist at perl

Jul 4, 2012, 12:24 PM

Post #8 of 12 (68 views)
Permalink
Re: [perl #94860] [PATCH] [DOCS] Modernize perlopentut.pod [In reply to]

=============
Short story
=============

EITHER:
#1 Show the courage to formally propose that all these myriad
things you morally disapprove of be RIPPED OUT of Perl once
and for all.
OR ELSE:
#2 Have the integrity to stop scolding people for the perfectly
legal acts they enjoy in their own bedroom.

==============
Medium story
==============

I am sick and tired of the scolding culture that has grown up
around here. It is stupid, and it is harmful. Make it stop.

The entire PerlCritic disaster has virtually ruined Perl culture,
replacing it with a bunch of busybodied holier-than-thou types.

And for what? For NOTHING, that's for what.

It is not a fun place to be. It is not in the spirit of Perl to
police people's private lives, or their past lives. I hate it.

Please stop with all the judgementalism, *especially* all this
scolding judgementalism that comes unaccompanied by actual
proposals and offers to rip out of Perl whatsoever you hold in
moral contempt. It does more harm than good.

--tom

============
Long story
============

> On 4 July 2012 16:25, Tom Christiansen <tchrist [at] perl> wrote:

>> I disagree with your "modernize" position.
>>
>> There is nothing unmodern old-fashioned -- let alone wrong -- with using
>> named unsigiled unautovivified filehandles and two-argument open for the
>> type of programs they were designed. It's a dumb witch hunt.

> While I respect your rights with regard to the document in
> question I wish to register the fact that I disagree with the
> point you make here.

> Perl has moved on since you wrote this document. It has grown past the
> "hacky sysadmin tool" to the main language used in multi-billion
> dollar shops with hundreds of developers.

My current $job is one of those. And the number of developers exceeds
hundreds. They use Perl a lot, although I don't think there are more than
hundreds of Perl programmers. They use C and C++ mostly, but sometimes
Java for end-user UI stuff, and I of course avoid that last part.

Very mostly they use Perl solely for what you with needless denigration
"hacky sysadmin stuff". There are a few Module.pl files they've written to
back these, but for each such module there may be a hundred little scripts.
Yes, some of these were originally written in the v4->v5 days, but most
weren't. They work just fine.

No, I wouldn't write all of them that way, but THERE IS NOTHING WRONG WITH
A SCRIPT WHOSE main CONTAINS BAREWORD HANDLES, LET ALONE WITH TWO ARGUMENT
OPEN. If you don't like it, THEN CHANGE PERL TO FORBID YOUR MORAL
OUTRAGES. I'm sorry I have to tell, but nobody is listening.

My current project has about 43,000 lines of existing Perl code
spread across hundreds of separate scripts along with fewer than
a dozen home-brewed modules. Sure, they use standard modules,
but *very* very few CPAN modules. It's too hard to deploy such
things in a worldwide heterogenous environment where you usually
rely on vendor-perl. Yes, it's all v5.8.x.

*I* have to maintain and support that code. The modules were written
before v5.6, which means autovivved filehandles weren't even available.

I'll be damned if I'm going to rewrite 43,000 lines of perfectly
functioning Perl code just to appease a meddling bunch of busibodies'
nose-cleaning ethic. I'm tired of listening to Pharisees on street
corners ranting and raving about the splinter in others' eyes. Some
of us have actual work to do, and the scold-culture's posturing just
gets in the way of that.

> The needs of the community have moved on too.

(See footnote.)

Oh really? I think not: please reread my above paragraphs.

And even though v5.6 introduced autovivified handles, this dumb
jihad against something perfectly legal didn't start until a lot
more recently than that.

> Neat hacks are no-where near as important as well trained devs
> who can be hired by companies like mine. Which is good for my
> company, and good for perl devs because we give them jobs.

I'm pretty sure your previous paragraph has little to nothing
to do with the matter at hand.

> So it is not a dumb witch hunt.

> I'll ask you a question: how many perl devs are in your shop? What is
> the most number of perl devs you have worked with at one time?

> Yves

If you want to remove bareword filehandles from Perl, then I advise
you to (attempt to do so) and stop pretending they aren't there.

Whether you attempt such a thing or not, I am tired of people
pretending there is something wrong with them in all possible
circumstances. There absolutely is not. I will not tolerate
lying to people.

And don't you dare try to tell me about globals blah blah
blah blah blah blah blah blah as though I am somehow ignorant
of the issue.

I wrote about that entire situation long before the overwhelming
majority of the people reading this message had even looked at Perl.
So don't try teaching your grandmother to suck eggs.

Here's a concrete proposal:

1. Intentionally break 25 years worth of compatibility by removing all
support of ***ALL*** BAREWORD HANDLES whatsoBLOODYever from the next
release of Perl. Completely. Make use v5.18 remove everything
you keep bitching about. Go ahead. Make everybody's day.

1a. Don't forget STDIN, STDOUT, STDERR, DATA, ARGV, and ARGVOUT.
1b. Don't forget stdin, stdout, stderr.
1c. Don't forget _.

2. Remove all mention of them from all documentation that Perl ships with.

2a. Don't forget to rewrite all the main documentation.
2b. Don't forget to rewrite all the module documentation.
2c. Don't forget to rewrite all the dual-lived module documentation.

When you make that proposal, then either it will be shot down as being too
damned pushy for the spirit of Per, or else the revisionists will finally
have their Brave New Modernist Genuflect-When-You-Say-That language.

That way all those who pretend that Perl was broken for its first 25 years,
and that those unclean programs written with BAREWORD HANDLES are evil and
wrong and weren't working right in the first place will finally have their
say and get their exclusionist way.

I have only one suggestion: please consider renaming the language
once you're done. I believe that's what they did for Perl6, eh?

Until then, there is nothing more to discuss. The whingeing is
counterproductive, and the scolding it wicked verging upon evil.

And for the record, I just *did* a code review of a Perl script written bny
someone else at $job. Guess what? There were BAREWORD HANDLES in that
program. Five of them, in fact. For the code review, I *in passing*
mentioned how one didn't have to do it that way. It wasn't on my list of
This Needs To Change, because it ddin't: there was nothing whatsoever WRONG
WITH THAT PROGRAM.

Plus -- now get this -- said code actually bothered to close the handles
and check the return value. A wonder to behold.

Yes, this *is* all a needless witch hunt, especially without removing
the Offending Abominations from the language.

But I'll tell you one that isn't.

Until and unless the destructor for autovivved handles begins to detect and
report failed implicit closes, I consider all programs that uses them and
relies about implicit closure to be inherently broken and wrong, and I will
continue to make public this showstopping situation at every possible
opportunity.

That's the only real problem I see here. All the rest is just so much
scolding by busybodies without anything better to do.

But if you want to catch a gander of what you need to do before you can
begin carrying out your Brave New Perl, I enclose a scant few citations of
just some things you'll need to rewrite before you can achieve your
Glorious Revolution.

That is, Here's some stuff you'll need to rewrite. Happy illumination.

1 pod/perl5004delta.pod:253:In harmony with this change, C<*GLOB{FILEHANDLE}> is now just a
2 pod/perl5004delta.pod:595:=head2 TIEHANDLE now supported
3 pod/perl5004delta.pod:601:=item TIEHANDLE classname, LIST
4 pod/perl5004delta.pod:607: sub TIEHANDLE {
5 pod/perl5004delta.pod:1482:(W) In a conditional expression, you used <HANDLE>, <*> (glob), C<each()>,
6 pod/perl5122delta.pod:278:Several memory leaks in L<stat()|perlfunc/"stat FILEHANDLE"> have been fixed.
7 pod/perl5140delta.pod:2916:Several memory leaks in L<stat()|perlfunc/"stat FILEHANDLE"> have been fixed (5.12.2).
8 pod/perl5160delta.pod:2921:C<-T I<HANDLE>>, even though it does a C<stat>, was not resetting the last
9 pod/perl561delta.pod:2300:=head2 <HANDLE> on empty files
10 pod/perl561delta.pod:2304:HANDLE is read after C<$/> is set to C<undef>. Further reads yield
11 pod/perl56delta.pod:1695:=head2 <HANDLE> on empty files
12 pod/perl56delta.pod:1699:HANDLE is read after C<$/> is set to C<undef>. Further reads yield
13 pod/perl58delta.pod:228:The *glob{FILEHANDLE} is deprecated, use *glob{IO} instead.
14 pod/perl58delta.pod:609:lstat(FILEHANDLE) now gives a warning because the operation makes no sense.
15 pod/perl58delta.pod:755:the <FILEHANDLE> angle bracket operator.
16 pod/perlcall.pod:1624: #define NULL_HANDLE -1
17 pod/perlcall.pod:1639: { fn1, NULL, NULL_HANDLE },
18 pod/perlcall.pod:1640: { fn2, NULL, NULL_HANDLE },
19 pod/perlcall.pod:1641: { fn3, NULL, NULL_HANDLE }
20 pod/perlcall.pod:1694: if (Map[index].Handle == NULL_HANDLE)
21 pod/perlcall.pod:1729: Map[index].Handle = NULL_HANDLE;
22 pod/perldata.pod:868:C<*HANDLE{IO}> only works if HANDLE has already been used as a handle.
23 pod/perldiag.pod:5373:=item Use of *glob{FILEHANDLE} is deprecated
24 pod/perldiag.pod:5533:(W misc) In a conditional expression, you used <HANDLE>, <*> (glob),
25 pod/perldsc.pod:703: HANDLE => \*STDOUT,
26 pod/perldsc.pod:718: print { $rec->{HANDLE} } "a string\n";
27 pod/perldsc.pod:721: $rec->{HANDLE}->autoflush(1);
28 pod/perldsc.pod:722: $rec->{HANDLE}->print(" a string\n");
29 pod/perlfunc.pod:344:=item -X FILEHANDLE
30 pod/perlfunc.pod:350:=item -X DIRHANDLE
31 pod/perlfunc.pod:601:=item binmode FILEHANDLE, LAYER
32 pod/perlfunc.pod:604:=item binmode FILEHANDLE
33 pod/perlfunc.pod:608:Arranges for FILEHANDLE to be read or written in "binary" or "text"
34 pod/perlfunc.pod:610:binary and text files. If FILEHANDLE is an expression, the value is
35 pod/perlfunc.pod:647:To mark FILEHANDLE as UTF-8, use C<:utf8> or C<:encoding(UTF-8)>.
36 pod/perlfunc.pod:803:=item chdir FILEHANDLE
37 pod/perlfunc.pod:805:=item chdir DIRHANDLE
38 pod/perlfunc.pod:1009:=item close FILEHANDLE
39 pod/perlfunc.pod:1022:You don't have to close FILEHANDLE if you are immediately going to do
40 pod/perlfunc.pod:1024:L<open|/open FILEHANDLE>.) However, an explicit C<close> on an input file resets the line
41 pod/perlfunc.pod:1055:FILEHANDLE may be an expression whose value can be used as an indirect
42 pod/perlfunc.pod:1058:=item closedir DIRHANDLE
43 pod/perlfunc.pod:1688:=item eof FILEHANDLE
44 pod/perlfunc.pod:1699:Returns 1 if the next read on FILEHANDLE will return end of file I<or> if
45 pod/perlfunc.pod:1700:FILEHANDLE is not open. FILEHANDLE may be an expression whose value
46 pod/perlfunc.pod:1704:C<eof(FILEHANDLE)> on it) after end-of-file is reached. File types such
47 pod/perlfunc.pod:2163:=item fcntl FILEHANDLE,FUNCTION,SCALAR
48 pod/perlfunc.pod:2211:=item fileno FILEHANDLE
49 pod/perlfunc.pod:2223:If FILEHANDLE is an expression, the value is taken as an indirect
50 pod/perlfunc.pod:2233:=item flock FILEHANDLE,OPERATION
51 pod/perlfunc.pod:2238:Calls flock(2), or an emulation of it, on FILEHANDLE. Returns true
52 pod/perlfunc.pod:2265:To avoid the possibility of miscoordination, Perl now flushes FILEHANDLE
53 pod/perlfunc.pod:2269:locks, and it requires that FILEHANDLE be open with write intent. These
54 pod/perlfunc.pod:2274:Note that the fcntl(2) emulation of flock(3) requires that FILEHANDLE
55 pod/perlfunc.pod:2404:=item getc FILEHANDLE
56 pod/perlfunc.pod:2411:Returns the next character from the input file attached to FILEHANDLE,
57 pod/perlfunc.pod:2413:the latter case C<$!> is set). If FILEHANDLE is omitted, reads from
58 pod/perlfunc.pod:3016:=item ioctl FILEHANDLE,FUNCTION,SCALAR
59 pod/perlfunc.pod:3495:=item lstat FILEHANDLE
60 pod/perlfunc.pod:3500:=item lstat DIRHANDLE
61 pod/perlfunc.pod:3793:=item open FILEHANDLE,EXPR
62 pod/perlfunc.pod:3796:=item open FILEHANDLE,MODE,EXPR
63 pod/perlfunc.pod:3798:=item open FILEHANDLE,MODE,EXPR,LIST
64 pod/perlfunc.pod:3800:=item open FILEHANDLE,MODE,REFERENCE
65 pod/perlfunc.pod:3802:=item open FILEHANDLE
66 pod/perlfunc.pod:3807:FILEHANDLE.
67 pod/perlfunc.pod:3822:If FILEHANDLE is an undefined scalar variable (or array or hash element), a
68 pod/perlfunc.pod:3825:FILEHANDLE is an expression, its value is the real filehandle. (This is
69 pod/perlfunc.pod:3830:name as the FILEHANDLE contains the filename. (Note that lexical
70 pod/perlfunc.pod:4033: open(FILEHANDLE, "<&=$fd")
71 pod/perlfunc.pod:4037: open(FILEHANDLE, "<&=", $fd)
72 pod/perlfunc.pod:4182: sysopen(HANDLE, $path, O_RDWR|O_CREAT|O_EXCL)
73 pod/perlfunc.pod:4184: $oldfh = select(HANDLE); $| = 1; select($oldfh);
74 pod/perlfunc.pod:4185: print HANDLE "stuff $$\n";
75 pod/perlfunc.pod:4186: seek(HANDLE, 0, 0);
76 pod/perlfunc.pod:4187: print "File contains: ", <HANDLE>;
77 pod/perlfunc.pod:4221:=item opendir DIRHANDLE,EXPR
78 pod/perlfunc.pod:4228:DIRHANDLE may be an expression whose value can be used as an indirect
79 pod/perlfunc.pod:4229:dirhandle, usually the real dirhandle name. If DIRHANDLE is an undefined
80 pod/perlfunc.pod:4232:DIRHANDLEs have their own namespace separate from FILEHANDLEs.
81 pod/perlfunc.pod:4978:or C<ThatPack::INPUT_HANDLE>. If package name is omitted, the C<main>
82 pod/perlfunc.pod:5000:=item pipe READHANDLE,WRITEHANDLE
83 pod/perlfunc.pod:5008:IO buffering, so you may need to set C<$|> to flush your WRITEHANDLE
84 pod/perlfunc.pod:5076:=item print FILEHANDLE LIST
85 pod/perlfunc.pod:5079:=item print FILEHANDLE
86 pod/perlfunc.pod:5088:FILEHANDLE may be a scalar variable containing the name of or a reference
87 pod/perlfunc.pod:5090:FILEHANDLE is a variable and the next token is a term, it may be
88 pod/perlfunc.pod:5092:parentheses around the arguments.) If FILEHANDLE is omitted, prints to the
89 pod/perlfunc.pod:5094:C<$_> to the currently selected output handle. To use FILEHANDLE alone to
90 pod/perlfunc.pod:5120:=item printf FILEHANDLE FORMAT, LIST
91 pod/perlfunc.pod:5123:=item printf FILEHANDLE
92 pod/perlfunc.pod:5131:Equivalent to C<print FILEHANDLE sprintf(FORMAT, LIST)>, except that C<$\>
93 pod/perlfunc.pod:5136:to use FILEHANDLE without a LIST, you must use a real filehandle like
94 pod/perlfunc.pod:5348:=item read FILEHANDLE,SCALAR,LENGTH,OFFSET
95 pod/perlfunc.pod:5351:=item read FILEHANDLE,SCALAR,LENGTH
96 pod/perlfunc.pod:5356:from the specified FILEHANDLE. Returns the number of characters
97 pod/perlfunc.pod:5371:L<sysread|/sysread FILEHANDLE,SCALAR,LENGTH,OFFSET>.
98 pod/perlfunc.pod:5381:=item readdir DIRHANDLE
99 pod/perlfunc.pod:5888:=item rewinddir DIRHANDLE
100 pod/perlfunc.pod:5894:C<readdir> routine on DIRHANDLE.
101 pod/perlfunc.pod:5929:=item say FILEHANDLE LIST
102 pod/perlfunc.pod:5932:=item say FILEHANDLE
103 pod/perlfunc.pod:5942:FILEHANDLE without a LIST to print the contents of C<$_> to it, you must
104 pod/perlfunc.pod:5982:=item seek FILEHANDLE,POSITION,WHENCE
105 pod/perlfunc.pod:5987:Sets FILEHANDLE's position, just like the C<fseek> call of C<stdio>.
106 pod/perlfunc.pod:5988:FILEHANDLE may be an expression whose value gives the name of the
107 pod/perlfunc.pod:6031:=item seekdir DIRHANDLE,POS
108 pod/perlfunc.pod:6036:Sets the current position for the C<readdir> routine on DIRHANDLE. POS
109 pod/perlfunc.pod:6041:=item select FILEHANDLE
110 pod/perlfunc.pod:6048:Returns the currently selected filehandle. If FILEHANDLE is supplied,
111 pod/perlfunc.pod:6051:default to this FILEHANDLE. Second, references to variables related to
112 pod/perlfunc.pod:6062:FILEHANDLE may be an expression whose value gives the name of the
113 pod/perlfunc.pod:7298:=item stat FILEHANDLE
114 pod/perlfunc.pod:7303:=item stat DIRHANDLE
115 pod/perlfunc.pod:7310:the file opened via FILEHANDLE or DIRHANDLE, or named by EXPR. If EXPR is
116 pod/perlfunc.pod:7680:=item sysopen FILEHANDLE,FILENAME,MODE
117 pod/perlfunc.pod:7683:=item sysopen FILEHANDLE,FILENAME,MODE,PERMS
118 pod/perlfunc.pod:7688:FILEHANDLE. If FILEHANDLE is an expression, its value is used as the real
119 pod/perlfunc.pod:7747:=item sysread FILEHANDLE,SCALAR,LENGTH,OFFSET
120 pod/perlfunc.pod:7750:=item sysread FILEHANDLE,SCALAR,LENGTH
121 pod/perlfunc.pod:7755:specified FILEHANDLE, using the read(2). It bypasses
122 pod/perlfunc.pod:7781:=item sysseek FILEHANDLE,POSITION,WHENCE
123 pod/perlfunc.pod:7786:Sets FILEHANDLE's system position in bytes using lseek(2). FILEHANDLE may
124 pod/perlfunc.pod:7890:=item syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET
125 pod/perlfunc.pod:7893:=item syswrite FILEHANDLE,SCALAR,LENGTH
126 pod/perlfunc.pod:7895:=item syswrite FILEHANDLE,SCALAR
127 pod/perlfunc.pod:7900:specified FILEHANDLE, using write(2). If LENGTH is
128 pod/perlfunc.pod:7923:=item tell FILEHANDLE
129 pod/perlfunc.pod:7930:Returns the current position I<in bytes> for FILEHANDLE, or -1 on
130 pod/perlfunc.pod:7931:error. FILEHANDLE may be an expression whose value gives the name of
131 pod/perlfunc.pod:7932:the actual filehandle. If FILEHANDLE is omitted, assumes the file
132 pod/perlfunc.pod:7950:=item telldir DIRHANDLE
133 pod/perlfunc.pod:7955:Returns the current position of the C<readdir> routines on DIRHANDLE.
134 pod/perlfunc.pod:7969:method of the class (meaning C<TIESCALAR>, C<TIEHANDLE>, C<TIEARRAY>,
135 pod/perlfunc.pod:8020: TIEHANDLE classname, LIST
136 pod/perlfunc.pod:8107:=item truncate FILEHANDLE,LENGTH
137 pod/perlfunc.pod:8114:Truncates the file opened on FILEHANDLE, or named by EXPR, to the
138 pod/perlfunc.pod:8121:The position in the file of FILEHANDLE is left unchanged. You may want to
139 pod/perlfunc.pod:8122:call L<seek|/"seek FILEHANDLE,POSITION,WHENCE"> before writing to the file.
140 pod/perlfunc.pod:8944:=item write FILEHANDLE
141 pod/perlfunc.pod:8953:Writes a formatted record (possibly multi-line) to the specified FILEHANDLE,
142 pod/perlfunc.pod:8969:If FILEHANDLE is unspecified, output goes to the current default output
143 pod/perlfunc.pod:8971:C<select> operator. If the FILEHANDLE is an EXPR, then the expression
144 pod/perlfunc.pod:8973:the FILEHANDLE at run time. For more on formats, see L<perlform>.
145 pod/perlop.pod:1188: open HANDLE, "< :utf8", "filename" or die "Can't open: $!\n";
146 pod/perlop.pod:1193: open(HANDLE, "< :utf8", "filename") or die "Can't open: $!\n";
147 pod/perlop.pod:1197: open(HANDLE, "< :utf8", "filename") || die "Can't open: $!\n";
148 pod/perlop.pod:2854:In other boolean contexts, C<< <FILEHANDLE> >> without an
149 pod/perlop.pod:2867:If a <FILEHANDLE> is used in a context that is looking for
150 pod/perlop.pod:2872:<FILEHANDLE> may also be spelled C<readline(*FILEHANDLE)>.
151 pod/perlopentut.pod:375: sysopen HANDLE, PATH, FLAGS, [MASK]
152 pod/perlopentut.pod:377:The HANDLE argument is a filehandle just as with C<open>. The PATH is
153 pod/perlport.pod:875:and writing to files (see L<"Newlines">). C<binmode(FILEHANDLE)>
154 pod/perlport.pod:1796:=item ioctl FILEHANDLE,FUNCTION,SCALAR
155 pod/perlport.pod:1889:Note that the C<select FILEHANDLE> form is generally portable.
156 pod/perlport.pod:2034:If a FILEHANDLE is supplied, it must be writable and opened in append
157 pod/perlref.pod:276:versions of Perl, C<*foo{FILEHANDLE}> is a synonym for C<*foo{IO}>, though it
158 pod/perlref.pod:285:C<*foo{IO}> is an alternative to the C<*HANDLE> mechanism given in
159 pod/perlsub.pod:1084: sub myopen (*;$) myopen HANDLE, $name
160 pod/perlsub.pod:1085: sub mypipe (**) mypipe READHANDLE, WRITEHANDLE
161 pod/perlsub.pod:1427:the equivalent I/O operator C<< <FILEHANDLE> >>. Also, overriding
162 pod/perltie.pod:37:TIEARRAY(), TIEHASH(), or TIEHANDLE(). (Typically these are arguments
163 pod/perltie.pod:856:methods: TIEHANDLE, at least one of PRINT, PRINTF, WRITE, READLINE, GETC,
164 pod/perltie.pod:884:=item TIEHANDLE classname, LIST
165 pod/perltie.pod:885:X<TIEHANDLE>
166 pod/perltie.pod:891: sub TIEHANDLE { print "<shout>\n"; my $i; bless \$i, shift }
167 pod/perltie.pod:949:This method is called when the handle is read via C<E<lt>HANDLEE<gt>>
168 pod/perltie.pod:950:or C<readline HANDLE>.
169 pod/perltie.pod:1219:TIEHANDLE by Sven Verdoolaege <F<skimo [at] dns>> and Doug MacEachern <F<dougm [at] osf>>
170 pod/perltoc.pod:2115:-I<X> FILEHANDLE
171 pod/perltoc.pod:2118:-I<X> DIRHANDLE, -I<X>, abs VALUE X<abs> X<absolute>, abs, accept
172 pod/perltoc.pod:2121:SOCKET,NAME X<bind>, binmode FILEHANDLE, LAYER X<binmode> X<binary> X<text>
173 pod/perltoc.pod:2122:X<DOS> X<Windows>, binmode FILEHANDLE, bless REF,CLASSNAME X<bless>, bless
174 pod/perltoc.pod:2124:caller, chdir EXPR X<chdir> X<cd> X<directory, change>, chdir FILEHANDLE,
175 pod/perltoc.pod:2125:chdir DIRHANDLE, chdir, chmod LIST X<chmod> X<permission> X<mode>, chomp
176 pod/perltoc.pod:2130:FILEHANDLE X<close>, close, closedir DIRHANDLE X<closedir>, connect
177 pod/perltoc.pod:2140:X<array, iterator>, each EXPR, eof FILEHANDLE X<eof> X<end of file>
178 pod/perltoc.pod:2147:X<casefold> X<fold-case> X<case-fold>, fc, fcntl FILEHANDLE,FUNCTION,SCALAR
179 pod/perltoc.pod:2148:X<fcntl>, __FILE__ X<__FILE__>, fileno FILEHANDLE X<fileno>, flock
180 pod/perltoc.pod:2149:FILEHANDLE,OPERATION X<flock> X<lock> X<locking>, fork X<fork> X<child>
181 pod/perltoc.pod:2151:FILEHANDLE X<getc> X<getchar> X<character> X<file, read>, getc, getlogin
182 pod/perltoc.pod:2175:FILEHANDLE,FUNCTION,SCALAR X<ioctl>, join EXPR,LIST X<join>, keys HASH
183 pod/perltoc.pod:2187:X<logarithm> X<e> X<ln> X<base>, log, lstat FILEHANDLE X<lstat>, lstat
184 pod/perltoc.pod:2188:EXPR, lstat DIRHANDLE, lstat, m//, map BLOCK LIST X<map>, map EXPR,LIST,
185 pod/perltoc.pod:2196:FILEHANDLE,EXPR X<open> X<pipe> X<file, open> X<fopen>, open
186 pod/perltoc.pod:2197:FILEHANDLE,MODE,EXPR, open FILEHANDLE,MODE,EXPR,LIST, open
187 pod/perltoc.pod:2198:FILEHANDLE,MODE,REFERENCE, open FILEHANDLE, opendir DIRHANDLE,EXPR
188 pod/perltoc.pod:2204:X<__PACKAGE__>, pipe READHANDLE,WRITEHANDLE X<pipe>, pop ARRAY X<pop>
189 pod/perltoc.pod:2206:FILEHANDLE LIST X<print>, print FILEHANDLE, print LIST, print, printf
190 pod/perltoc.pod:2207:FILEHANDLE FORMAT, LIST X<printf>, printf FILEHANDLE, printf FORMAT, LIST,
191 pod/perltoc.pod:2211:X<random>, rand, read FILEHANDLE,SCALAR,LENGTH,OFFSET X<read> X<file,
192 pod/perltoc.pod:2212:read>, read FILEHANDLE,SCALAR,LENGTH, readdir DIRHANDLE X<readdir>,
193 pod/perltoc.pod:2219:X<rev> X<invert>, rewinddir DIRHANDLE X<rewinddir>, rindex
194 pod/perltoc.pod:2221:X<rd> X<directory, remove>, rmdir, s///, say FILEHANDLE LIST X<say>, say
195 pod/perltoc.pod:2222:FILEHANDLE, say LIST, say, scalar EXPR X<scalar> X<context>, seek
196 pod/perltoc.pod:2223:FILEHANDLE,POSITION,WHENCE X<seek> X<fseek> X<filehandle, position>,
197 pod/perltoc.pod:2224:seekdir DIRHANDLE,POS X<seekdir>, select FILEHANDLE X<select> X<filehandle,
198 pod/perltoc.pod:2244:srand EXPR X<srand> X<seed> X<randseed>, srand, stat FILEHANDLE X<stat>
199 pod/perltoc.pod:2245:X<file, status> X<ctime>, stat EXPR, stat DIRHANDLE, stat, state EXPR
200 pod/perltoc.pod:2253:FILEHANDLE,FILENAME,MODE X<sysopen>, sysopen
201 pod/perltoc.pod:2254:FILEHANDLE,FILENAME,MODE,PERMS, sysread FILEHANDLE,SCALAR,LENGTH,OFFSET
202 pod/perltoc.pod:2255:X<sysread>, sysread FILEHANDLE,SCALAR,LENGTH, sysseek
203 pod/perltoc.pod:2256:FILEHANDLE,POSITION,WHENCE X<sysseek> X<lseek>, system LIST X<system>
204 pod/perltoc.pod:2257:X<shell>, system PROGRAM LIST, syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET
205 pod/perltoc.pod:2258:X<syswrite>, syswrite FILEHANDLE,SCALAR,LENGTH, syswrite FILEHANDLE,SCALAR,
206 pod/perltoc.pod:2259:tell FILEHANDLE X<tell>, tell, telldir DIRHANDLE X<telldir>, tie
207 pod/perltoc.pod:2261:X<epoch>, times X<times>, tr///, truncate FILEHANDLE,LENGTH X<truncate>,
208 pod/perltoc.pod:2272:FILEHANDLE X<write>, write EXPR, write, y///
209 pod/perltoc.pod:2831:X<$,> X<$OFS> X<$OUTPUT_FIELD_SEPARATOR>, HANDLE->input_line_number( EXPR
210 pod/perltoc.pod:2833:number>, HANDLE->input_record_separator( EXPR ), $INPUT_RECORD_SEPARATOR,
211 pod/perltoc.pod:2836:X<$\> X<$ORS> X<$OUTPUT_RECORD_SEPARATOR>, HANDLE->autoflush( EXPR ),
212 pod/perltoc.pod:2838:$ACCUMULATOR, $^A X<$^A> X<$ACCUMULATOR>, HANDLE->format_formfeed(EXPR),
213 pod/perltoc.pod:2840:HANDLE->format_page_number(EXPR), $FORMAT_PAGE_NUMBER, $% X<$%>
214 pod/perltoc.pod:2841:X<$FORMAT_PAGE_NUMBER>, HANDLE->format_lines_left(EXPR),
215 pod/perltoc.pod:2845:HANDLE->format_lines_per_page(EXPR), $FORMAT_LINES_PER_PAGE, $= X<$=>
216 pod/perltoc.pod:2846:X<$FORMAT_LINES_PER_PAGE>, HANDLE->format_top_name(EXPR), $FORMAT_TOP_NAME,
217 pod/perltoc.pod:2847:$^ X<$^> X<$FORMAT_TOP_NAME>, HANDLE->format_name(EXPR), $FORMAT_NAME, $~
218 pod/perltoc.pod:3284:TIEHANDLE classname, LIST X<TIEHANDLE>, WRITE this, LIST X<WRITE>, PRINT
219 pod/perltoc.pod:3685:gmtime, ioctl FILEHANDLE,FUNCTION,SCALAR, kill, link, localtime, lstat,
220 pod/perltoc.pod:10347:=item <HANDLE> on empty files
221 pod/perltoc.pod:10729:=item <HANDLE> on empty files
222 pod/perltoc.pod:11143:=item TIEHANDLE now supported
223 pod/perltoc.pod:11145:TIEHANDLE classname, LIST, PRINT this, LIST, PRINTF this, LIST, READ this
224 pod/perltoc.pod:12782:File tests, backticks, binmode FILEHANDLE, crypt PLAINTEXT, USER, die,
225 pod/perltoc.pod:14038:=item SIGNAL HANDLERS
226 pod/perltoc.pod:25429:new ( [ HANDLES ] )
227 pod/perltoc.pod:25433:add ( HANDLES ), remove ( HANDLES ), exists ( HANDLE ), handles, can_read (
228 pod/perltoc.pod:29976:size ( FILE ), supported ( CMD ), hash ( [FILEHANDLE_GLOB_REF],[.
229 pod/perltoc.pod:36352:TIEHANDLE classname, LIST, WRITE this, scalar, length, offset, PRINT this,
230 pod/perlvar.pod:1121:variables. (Summary lines below for this contain the word HANDLE.)
231 pod/perlvar.pod:1128: method HANDLE EXPR
232 pod/perlvar.pod:1132: HANDLE->method(EXPR)
233 pod/perlvar.pod:1265:=item HANDLE->input_line_number( EXPR )
234 pod/perlvar.pod:1294:You can also use C<< HANDLE->input_line_number(EXPR) >> to access the
235 pod/perlvar.pod:1300:=item HANDLE->input_record_separator( EXPR )
236 pod/perlvar.pod:1375:=item HANDLE->autoflush( EXPR )
237 pod/perlvar.pod:1418:=item HANDLE->format_formfeed(EXPR)
238 pod/perlvar.pod:1427:=item HANDLE->format_page_number(EXPR)
239 pod/perlvar.pod:1438:=item HANDLE->format_lines_left(EXPR)
240 pod/perlvar.pod:1463:=item HANDLE->format_lines_per_page(EXPR)
241 pod/perlvar.pod:1475:=item HANDLE->format_top_name(EXPR)
242 pod/perlvar.pod:1489:=item HANDLE->format_name(EXPR)
243 pod/perlvms.pod:629:=item binmode FILEHANDLE
244 ext/Pod-Html/testdir/perlvar-copy.pod:29:lines below for this contain the word HANDLE.) First you must say
245 ext/Pod-Html/testdir/perlvar-copy.pod:35: method HANDLE EXPR
246 ext/Pod-Html/testdir/perlvar-copy.pod:39: HANDLE->method(EXPR)
247 ext/Pod-Html/testdir/perlvar-copy.pod:377:=item HANDLE->input_line_number(EXPR)
248 ext/Pod-Html/testdir/perlvar-copy.pod:406:You can also use C<< HANDLE->input_line_number(EXPR) >> to access the
249 ext/Pod-Html/testdir/perlvar-copy.pod:467:=item HANDLE->autoflush(EXPR)
250 ext/Pod-Html/testdir/perlvar-copy.pod:556:=item HANDLE->format_page_number(EXPR)
251 ext/Pod-Html/testdir/perlvar-copy.pod:567:=item HANDLE->format_lines_per_page(EXPR)
252 ext/Pod-Html/testdir/perlvar-copy.pod:579:=item HANDLE->format_lines_left(EXPR)
253 ext/Pod-Html/testdir/perlvar-copy.pod:675:=item HANDLE->format_name(EXPR)
254 ext/Pod-Html/testdir/perlvar-copy.pod:686:=item HANDLE->format_top_name(EXPR)
255 lib/IO/Compress/FAQ.pod:240: sub TIEHANDLE {
256 lib/perlfaq8.pod:213: my $OUT = Win32::Console->new(STD_OUTPUT_HANDLE);
257 lib/perlglossary.pod:787:designated with C<select(FILEHANDLE)>; C<STDOUT>, if no filehandle has
258 cpan/IO-Compress/lib/IO/Compress/FAQ.pod:240: sub TIEHANDLE {
259 cpan/perlfaq/lib/perlfaq8.pod:213: my $OUT = Win32::Console->new(STD_OUTPUT_HANDLE);
260 cpan/perlfaq/lib/perlglossary.pod:787:designated with C<select(FILEHANDLE)>; C<STDOUT>, if no filehandle has
261 cpan/Pod-Perldoc/corpus/perlfunc.pod:302:=item -X FILEHANDLE
262 cpan/Pod-Perldoc/corpus/perlfunc.pod:308:=item -X DIRHANDLE
263 cpan/Pod-Perldoc/corpus/perlfunc.pod:541:=item binmode FILEHANDLE, LAYER
264 cpan/Pod-Perldoc/corpus/perlfunc.pod:544:=item binmode FILEHANDLE
265 cpan/Pod-Perldoc/corpus/perlfunc.pod:546:Arranges for FILEHANDLE to be read or written in "binary" or "text"
266 cpan/Pod-Perldoc/corpus/perlfunc.pod:548:binary and text files. If FILEHANDLE is an expression, the value is
267 cpan/Pod-Perldoc/corpus/perlfunc.pod:585:To mark FILEHANDLE as UTF-8, use C<:utf8> or C<:encoding(UTF-8)>.
268 cpan/Pod-Perldoc/corpus/perlfunc.pod:734:=item chdir FILEHANDLE
269 cpan/Pod-Perldoc/corpus/perlfunc.pod:736:=item chdir DIRHANDLE
270 cpan/Pod-Perldoc/corpus/perlfunc.pod:926:=item close FILEHANDLE
271 cpan/Pod-Perldoc/corpus/perlfunc.pod:937:You don't have to close FILEHANDLE if you are immediately going to do
272 cpan/Pod-Perldoc/corpus/perlfunc.pod:939:L<open|/open FILEHANDLE>.) However, an explicit C<close> on an input file resets the line
273 cpan/Pod-Perldoc/corpus/perlfunc.pod:970:FILEHANDLE may be an expression whose value can be used as an indirect
274 cpan/Pod-Perldoc/corpus/perlfunc.pod:973:=item closedir DIRHANDLE
275 cpan/Pod-Perldoc/corpus/perlfunc.pod:1569:=item eof FILEHANDLE
276 cpan/Pod-Perldoc/corpus/perlfunc.pod:1578:Returns 1 if the next read on FILEHANDLE will return end of file I<or> if
277 cpan/Pod-Perldoc/corpus/perlfunc.pod:1579:FILEHANDLE is not open. FILEHANDLE may be an expression whose value
278 cpan/Pod-Perldoc/corpus/perlfunc.pod:1583:C<eof(FILEHANDLE)> on it) after end-of-file is reached. File types such
279 cpan/Pod-Perldoc/corpus/perlfunc.pod:1979:=item fcntl FILEHANDLE,FUNCTION,SCALAR
280 cpan/Pod-Perldoc/corpus/perlfunc.pod:2023:=item fileno FILEHANDLE
281 cpan/Pod-Perldoc/corpus/perlfunc.pod:2033:If FILEHANDLE is an expression, the value is taken as an indirect
282 cpan/Pod-Perldoc/corpus/perlfunc.pod:2043:=item flock FILEHANDLE,OPERATION
283 cpan/Pod-Perldoc/corpus/perlfunc.pod:2046:Calls flock(2), or an emulation of it, on FILEHANDLE. Returns true
284 cpan/Pod-Perldoc/corpus/perlfunc.pod:2073:To avoid the possibility of miscoordination, Perl now flushes FILEHANDLE
285 cpan/Pod-Perldoc/corpus/perlfunc.pod:2077:locks, and it requires that FILEHANDLE be open with write intent. These
286 cpan/Pod-Perldoc/corpus/perlfunc.pod:2082:Note that the fcntl(2) emulation of flock(3) requires that FILEHANDLE
287 cpan/Pod-Perldoc/corpus/perlfunc.pod:2204:=item getc FILEHANDLE
288 cpan/Pod-Perldoc/corpus/perlfunc.pod:2209:Returns the next character from the input file attached to FILEHANDLE,
289 cpan/Pod-Perldoc/corpus/perlfunc.pod:2211:the latter case C<$!> is set). If FILEHANDLE is omitted, reads from
290 cpan/Pod-Perldoc/corpus/perlfunc.pod:2748:=item ioctl FILEHANDLE,FUNCTION,SCALAR
291 cpan/Pod-Perldoc/corpus/perlfunc.pod:3169:=item lstat FILEHANDLE
292 cpan/Pod-Perldoc/corpus/perlfunc.pod:3174:=item lstat DIRHANDLE
293 cpan/Pod-Perldoc/corpus/perlfunc.pod:3441:=item open FILEHANDLE,EXPR
294 cpan/Pod-Perldoc/corpus/perlfunc.pod:3444:=item open FILEHANDLE,MODE,EXPR
295 cpan/Pod-Perldoc/corpus/perlfunc.pod:3446:=item open FILEHANDLE,MODE,EXPR,LIST
296 cpan/Pod-Perldoc/corpus/perlfunc.pod:3448:=item open FILEHANDLE,MODE,REFERENCE
297 cpan/Pod-Perldoc/corpus/perlfunc.pod:3450:=item open FILEHANDLE
298 cpan/Pod-Perldoc/corpus/perlfunc.pod:3453:FILEHANDLE.
299 cpan/Pod-Perldoc/corpus/perlfunc.pod:3468:If FILEHANDLE is an undefined scalar variable (or array or hash element), a
300 cpan/Pod-Perldoc/corpus/perlfunc.pod:3471:FILEHANDLE is an expression, its value is the real filehandle. (This is
301 cpan/Pod-Perldoc/corpus/perlfunc.pod:3476:name as the FILEHANDLE contains the filename. (Note that lexical
302 cpan/Pod-Perldoc/corpus/perlfunc.pod:3678: open(FILEHANDLE, "<&=$fd")
303 cpan/Pod-Perldoc/corpus/perlfunc.pod:3682: open(FILEHANDLE, "<&=", $fd)
304 cpan/Pod-Perldoc/corpus/perlfunc.pod:3826: sysopen(HANDLE, $path, O_RDWR|O_CREAT|O_EXCL)
305 cpan/Pod-Perldoc/corpus/perlfunc.pod:3828: $oldfh = select(HANDLE); $| = 1; select($oldfh);
306 cpan/Pod-Perldoc/corpus/perlfunc.pod:3829: print HANDLE "stuff $$\n";
307 cpan/Pod-Perldoc/corpus/perlfunc.pod:3830: seek(HANDLE, 0, 0);
308 cpan/Pod-Perldoc/corpus/perlfunc.pod:3831: print "File contains: ", <HANDLE>;
309 cpan/Pod-Perldoc/corpus/perlfunc.pod:3865:=item opendir DIRHANDLE,EXPR
310 cpan/Pod-Perldoc/corpus/perlfunc.pod:3870:DIRHANDLE may be an expression whose value can be used as an indirect
311 cpan/Pod-Perldoc/corpus/perlfunc.pod:3871:dirhandle, usually the real dirhandle name. If DIRHANDLE is an undefined
312 cpan/Pod-Perldoc/corpus/perlfunc.pod:3874:DIRHANDLEs have their own namespace separate from FILEHANDLEs.
313 cpan/Pod-Perldoc/corpus/perlfunc.pod:4611:or C<ThatPack::INPUT_HANDLE>. If package name is omitted, the C<main>
314 cpan/Pod-Perldoc/corpus/perlfunc.pod:4626:=item pipe READHANDLE,WRITEHANDLE
315 cpan/Pod-Perldoc/corpus/perlfunc.pod:4632:IO buffering, so you may need to set C<$|> to flush your WRITEHANDLE
316 cpan/Pod-Perldoc/corpus/perlfunc.pod:4692:=item print FILEHANDLE LIST
317 cpan/Pod-Perldoc/corpus/perlfunc.pod:4695:=item print FILEHANDLE
318 cpan/Pod-Perldoc/corpus/perlfunc.pod:4702:FILEHANDLE may be a scalar variable containing the name of or a reference
319 cpan/Pod-Perldoc/corpus/perlfunc.pod:4704:FILEHANDLE is a variable and the next token is a term, it may be
320 cpan/Pod-Perldoc/corpus/perlfunc.pod:4706:parentheses around the arguments.) If FILEHANDLE is omitted, prints to the
321 cpan/Pod-Perldoc/corpus/perlfunc.pod:4708:C<$_> to the currently selected output handle. To use FILEHANDLE alone to
322 cpan/Pod-Perldoc/corpus/perlfunc.pod:4734:=item printf FILEHANDLE FORMAT, LIST
323 cpan/Pod-Perldoc/corpus/perlfunc.pod:4737:=item printf FILEHANDLE
324 cpan/Pod-Perldoc/corpus/perlfunc.pod:4743:Equivalent to C<print FILEHANDLE sprintf(FORMAT, LIST)>, except that C<$\>
325 cpan/Pod-Perldoc/corpus/perlfunc.pod:4748:to use FILEHANDLE without a LIST, you must use a real filehandle like
326 cpan/Pod-Perldoc/corpus/perlfunc.pod:4882:=item read FILEHANDLE,SCALAR,LENGTH,OFFSET
327 cpan/Pod-Perldoc/corpus/perlfunc.pod:4885:=item read FILEHANDLE,SCALAR,LENGTH
328 cpan/Pod-Perldoc/corpus/perlfunc.pod:4888:from the specified FILEHANDLE. Returns the number of characters
329 cpan/Pod-Perldoc/corpus/perlfunc.pod:4903:L<sysread|/sysread FILEHANDLE,SCALAR,LENGTH,OFFSET>.
330 cpan/Pod-Perldoc/corpus/perlfunc.pod:4913:=item readdir DIRHANDLE
331 cpan/Pod-Perldoc/corpus/perlfunc.pod:5388:=item rewinddir DIRHANDLE
332 cpan/Pod-Perldoc/corpus/perlfunc.pod:5392:C<readdir> routine on DIRHANDLE.
333 cpan/Pod-Perldoc/corpus/perlfunc.pod:5421:=item say FILEHANDLE LIST
334 cpan/Pod-Perldoc/corpus/perlfunc.pod:5424:=item say FILEHANDLE
335 cpan/Pod-Perldoc/corpus/perlfunc.pod:5432:FILEHANDLE without a LIST to print the contents of C<$_> to it, you must
336 cpan/Pod-Perldoc/corpus/perlfunc.pod:5470:=item seek FILEHANDLE,POSITION,WHENCE
337 cpan/Pod-Perldoc/corpus/perlfunc.pod:5473:Sets FILEHANDLE's position, just like the C<fseek> call of C<stdio>.
338 cpan/Pod-Perldoc/corpus/perlfunc.pod:5474:FILEHANDLE may be an expression whose value gives the name of the
339 cpan/Pod-Perldoc/corpus/perlfunc.pod:5517:=item seekdir DIRHANDLE,POS
340 cpan/Pod-Perldoc/corpus/perlfunc.pod:5520:Sets the current position for the C<readdir> routine on DIRHANDLE. POS
341 cpan/Pod-Perldoc/corpus/perlfunc.pod:5525:=item select FILEHANDLE
342 cpan/Pod-Perldoc/corpus/perlfunc.pod:5530:Returns the currently selected filehandle. If FILEHANDLE is supplied,
343 cpan/Pod-Perldoc/corpus/perlfunc.pod:5533:default to this FILEHANDLE. Second, references to variables related to
344 cpan/Pod-Perldoc/corpus/perlfunc.pod:5544:FILEHANDLE may be an expression whose value gives the name of the
345 cpan/Pod-Perldoc/corpus/perlfunc.pod:6671:=item stat FILEHANDLE
346 cpan/Pod-Perldoc/corpus/perlfunc.pod:6676:=item stat DIRHANDLE
347 cpan/Pod-Perldoc/corpus/perlfunc.pod:6681:the file opened via FILEHANDLE or DIRHANDLE, or named by EXPR. If EXPR is
348 cpan/Pod-Perldoc/corpus/perlfunc.pod:7026:=item sysopen FILEHANDLE,FILENAME,MODE
349 cpan/Pod-Perldoc/corpus/perlfunc.pod:7029:=item sysopen FILEHANDLE,FILENAME,MODE,PERMS
350 cpan/Pod-Perldoc/corpus/perlfunc.pod:7032:FILEHANDLE. If FILEHANDLE is an expression, its value is used as the real
351 cpan/Pod-Perldoc/corpus/perlfunc.pod:7091:=item sysread FILEHANDLE,SCALAR,LENGTH,OFFSET
352 cpan/Pod-Perldoc/corpus/perlfunc.pod:7094:=item sysread FILEHANDLE,SCALAR,LENGTH
353 cpan/Pod-Perldoc/corpus/perlfunc.pod:7097:specified FILEHANDLE, using the read(2). It bypasses
354 cpan/Pod-Perldoc/corpus/perlfunc.pod:7123:=item sysseek FILEHANDLE,POSITION,WHENCE
355 cpan/Pod-Perldoc/corpus/perlfunc.pod:7126:Sets FILEHANDLE's system position in bytes using lseek(2). FILEHANDLE may
356 cpan/Pod-Perldoc/corpus/perlfunc.pod:7228:=item syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET
357 cpan/Pod-Perldoc/corpus/perlfunc.pod:7231:=item syswrite FILEHANDLE,SCALAR,LENGTH
358 cpan/Pod-Perldoc/corpus/perlfunc.pod:7233:=item syswrite FILEHANDLE,SCALAR
359 cpan/Pod-Perldoc/corpus/perlfunc.pod:7236:specified FILEHANDLE, using write(2). If LENGTH is
360 cpan/Pod-Perldoc/corpus/perlfunc.pod:7259:=item tell FILEHANDLE
361 cpan/Pod-Perldoc/corpus/perlfunc.pod:7264:Returns the current position I<in bytes> for FILEHANDLE, or -1 on
362 cpan/Pod-Perldoc/corpus/perlfunc.pod:7265:error. FILEHANDLE may be an expression whose value gives the name of
363 cpan/Pod-Perldoc/corpus/perlfunc.pod:7266:the actual filehandle. If FILEHANDLE is omitted, assumes the file
364 cpan/Pod-Perldoc/corpus/perlfunc.pod:7284:=item telldir DIRHANDLE
365 cpan/Pod-Perldoc/corpus/perlfunc.pod:7287:Returns the current position of the C<readdir> routines on DIRHANDLE.
366 cpan/Pod-Perldoc/corpus/perlfunc.pod:7299:method of the class (meaning C<TIESCALAR>, C<TIEHANDLE>, C<TIEARRAY>,
367 cpan/Pod-Perldoc/corpus/perlfunc.pod:7350: TIEHANDLE classname, LIST
368 cpan/Pod-Perldoc/corpus/perlfunc.pod:7429:=item truncate FILEHANDLE,LENGTH
369 cpan/Pod-Perldoc/corpus/perlfunc.pod:7434:Truncates the file opened on FILEHANDLE, or named by EXPR, to the
370 cpan/Pod-Perldoc/corpus/perlfunc.pod:7441:The position in the file of FILEHANDLE is left unchanged. You may want to
371 cpan/Pod-Perldoc/corpus/perlfunc.pod:7442:call L<seek|/"seek FILEHANDLE,POSITION,WHENCE"> before writing to the file.
372 cpan/Pod-Perldoc/corpus/perlfunc.pod:8260:=item write FILEHANDLE
373 cpan/Pod-Perldoc/corpus/perlfunc.pod:8267:Writes a formatted record (possibly multi-line) to the specified FILEHANDLE,
374 cpan/Pod-Perldoc/corpus/perlfunc.pod:8283:If FILEHANDLE is unspecified, output goes to the current default output
375 cpan/Pod-Perldoc/corpus/perlfunc.pod:8285:C<select> operator. If the FILEHANDLE is an EXPR, then the expression
376 cpan/Pod-Perldoc/corpus/perlfunc.pod:8287:the FILEHANDLE at run time. For more on formats, see L<perlform>.
377 cpan/Pod-Simple/t/perlvar.pod:23:below for this contain the word HANDLE.) First you must say
378 cpan/Pod-Simple/t/perlvar.pod:29: method HANDLE EXPR
379 cpan/Pod-Simple/t/perlvar.pod:33: HANDLE->method(EXPR)
380 cpan/Pod-Simple/t/perlvar.pod:212:=item input_line_number HANDLE EXPR
381 cpan/Pod-Simple/t/perlvar.pod:233:=item input_record_separator HANDLE EXPR
382 cpan/Pod-Simple/t/perlvar.pod:286:=item autoflush HANDLE EXPR
383 cpan/Pod-Simple/t/perlvar.pod:304:=item output_field_separator HANDLE EXPR
384 cpan/Pod-Simple/t/perlvar.pod:319:=item output_record_separator HANDLE EXPR
385 cpan/Pod-Simple/t/perlvar.pod:390:=item format_page_number HANDLE EXPR
386 cpan/Pod-Simple/t/perlvar.pod:400:=item format_lines_per_page HANDLE EXPR
387 cpan/Pod-Simple/t/perlvar.pod:411:=item format_lines_left HANDLE EXPR
388 cpan/Pod-Simple/t/perlvar.pod:465:=item format_name HANDLE EXPR
389 cpan/Pod-Simple/t/perlvar.pod:475:=item format_top_name HANDLE EXPR
390 cpan/Pod-Simple/t/perlvar.pod:485:=item format_line_break_characters HANDLE EXPR
391 cpan/Pod-Simple/t/perlvar.pod:496:=item format_formfeed HANDLE EXPR

But wait! That's not all! Yes, some of these are false positives,
but most are not.

=head1 ext/IPC-Open3/lib/IPC/Open2.pm chunk 14

$pid = open(HANDLE, "|cmd args|");

=head1 ext/PerlIO-via/via.pm chunk 16

In the method descriptions below I<$fh> will be
a reference to a glob which can be treated as a perl file handle.
It refers to the layer below. I<$fh> is not passed if the layer
is at the bottom of the stack, for this reason and to maintain
some level of "compatibility" with TIEHANDLE classes it is passed last.

=head1 ext/PerlIO-via/via.pm chunk 19

Should return an object or the class, or -1 on failure. (Compare
TIEHANDLE.) The arguments are an optional mode string ("r", "w",
"w+", ...) and a filehandle for the PerlIO layer below. Mandatory.

=head1 lib/CGI.pm chunk 613

$query->save(\*FILEHANDLE)

=head1 lib/IO/Select.pm chunk 50

=item new ( [ HANDLES ] )

=head1 lib/IO/Select.pm chunk 55

=item add ( HANDLES )

=head1 lib/IO/Select.pm chunk 58

=item remove ( HANDLES )

=head1 lib/IO/Select.pm chunk 60

=item exists ( HANDLE )

=head1 lib/IO/Zlib.pm chunk 12

With Perl 5.004 you can also use the TIEHANDLE interface to access
compressed files just like ordinary files:

=head1 lib/IPC/Open2.pm chunk 14

$pid = open(HANDLE, "|cmd args|");

=head1 lib/Net/FTP.pm chunk 390

=item hash ( [FILEHANDLE_GLOB_REF],[ BYTES_PER_HASH_MARK] )

=head1 lib/Object/Accessor.pm chunk 10

$bool = $obj->mk_accessors('foo'); # create accessors
$bool = $obj->mk_accessors( # create accessors with input
{foo => ALLOW_HANDLER} ); # validation

=head1 lib/PerlIO/via.pm chunk 16

In the method descriptions below I<$fh> will be
a reference to a glob which can be treated as a perl file handle.
It refers to the layer below. I<$fh> is not passed if the layer
is at the bottom of the stack, for this reason and to maintain
some level of "compatibility" with TIEHANDLE classes it is passed last.

=head1 lib/PerlIO/via.pm chunk 19

Should return an object or the class, or -1 on failure. (Compare
TIEHANDLE.) The arguments are an optional mode string ("r", "w",
"w+", ...) and a filehandle for the PerlIO layer below. Mandatory.

=head1 lib/Search/Dict.pm chunk 7

use Search::Dict;
look *FILEHANDLE, $key, $dict, $fold;

use Search::Dict;
look *FILEHANDLE, $params;

=head1 lib/Search/Dict.pm chunk 10

Sets file position in FILEHANDLE to be first line greater than or equal
(stringwise) to I<$key>. Returns the new file position, or -1 if an error
occurs.

=head1 lib/SelectSaver.pm chunk 7

{
my $saver = SelectSaver->new(FILEHANDLE);
# FILEHANDLE is selected
}
# previous handle is selected

=head1 lib/sigtrap.pm chunk 20

=head2 SIGNAL HANDLERS

=head1 lib/TAP/Harness.pm chunk 249

L<prove> supports C<TAP::Harness> plugins, and has a plugin system of its
own. See L<prove/FORMATTERS>, L<prove/SOURCE HANDLERS> and L<App::Prove>
for more details.

=head1 lib/threads.pm chunk 112

This I<private> method returns the memory location of the internal thread
structure associated with a threads object. For Win32, this is a pointer to
the C<HANDLE> value returned by C<CreateThread> (i.e., C<HANDLE *>); for other
platforms, it is a pointer to the C<pthread_t> structure used in the
C<pthread_create> call (i.e., C<pthread_t *>).

=head1 lib/threads.pm chunk 313

In perl 5.14 and higher, on systems other than Windows that do
not support the C<fchdir> C function, directory handles (see
L<opendir|perlfunc/"opendir DIRHANDLE,EXPR">) will not be copied to new
threads. You can use the C<d_fchdir> variable in L<Config.pm|Config> to
determine whether your system supports it.

=head1 lib/Tie/Handle.pm chunk 9

sub READ { ... } # Provide a needed method
sub TIEHANDLE { ... } # Overrides inherited method

=head1 lib/Tie/Handle.pm chunk 13

This module provides some skeletal methods for handle-tying classes. See
L<perltie> for a list of the functions required in tying a handle to a package.
The basic B<Tie::Handle> package provides a C<new> method, as well as methods
C<TIEHANDLE>, C<PRINT>, C<PRINTF> and C<GETC>.

=head1 lib/Tie/Handle.pm chunk 16

=item TIEHANDLE classname, LIST

=head1 lib/Tie/StdHandle.pm chunk 9

sub READ { ... } # Provide a needed method
sub TIEHANDLE { ... } # Overrides inherited method

=head1 cpan/CGI/lib/CGI.pm chunk 613

$query->save(\*FILEHANDLE)

=head1 cpan/IO-Zlib/Zlib.pm chunk 12

With Perl 5.004 you can also use the TIEHANDLE interface to access
compressed files just like ordinary files:

=head1 cpan/libnet/Net/FTP.pm chunk 390

=item hash ( [FILEHANDLE_GLOB_REF],[ BYTES_PER_HASH_MARK] )

=head1 cpan/Object-Accessor/lib/Object/Accessor.pm chunk 10

$bool = $obj->mk_accessors('foo'); # create accessors
$bool = $obj->mk_accessors( # create accessors with input
{foo => ALLOW_HANDLER} ); # validation

=head1 cpan/Test-Harness/lib/TAP/Harness.pm chunk 249

L<prove> supports C<TAP::Harness> plugins, and has a plugin system of its
own. See L<prove/FORMATTERS>, L<prove/SOURCE HANDLERS> and L<App::Prove>
for more details.

=head1 cpan/Win32API-File/File.pm chunk 143

Nothing is exported by default. The following tags can be used to
have large sets of symbols exported: C<":Func">, C<":FuncA">,
C<":FuncW">, C<":Misc">, C<":DDD_">, C<":DRIVE_">, C<":FILE_">,
C<":FILE_ATTRIBUTE_">, C<":FILE_FLAG_">, C<":FILE_SHARE_">,
C<":FILE_TYPE_">, C<":FS_">, C<":FSCTL_">, C<":HANDLE_FLAG_">,
C<":IOCTL_STORAGE_">, C<":IOCTL_DISK_">, C<":GENERIC_">,
C<":MEDIA_TYPE">, C<":MOVEFILE_">, C<":SECURITY_">, C<":SEM_">,
and C<":PARTITION_">.

=head1 cpan/Win32API-File/File.pm chunk 320

C<FdGetOsFHandle> simply calls C<_get_osfhandle()>. It was renamed
to better fit in with the rest the function names of this module,
in particular to distinguish it from C<GetOsFHandle>. It takes an
integer file descriptor [as from Perl's C<fileno>] and returns the
Win32 native file handle associated with that file descriptor or
C<INVALID_HANDLE_VALUE> if C<$ivFd> is not an open file descriptor.

When you call Perl's C<open> to set a Perl file handle [like C<STDOUT>],
Perl calls C's C<fopen> to set a stdio C<FILE *>. C's C<fopen> calls
something like Unix's C<open>, that is, Win32's C<_sopen>, to get an
integer file descriptor [where 0 is for C<STDIN>, 1 for C<STDOUT>, etc.].
Win32's C<_sopen> calls C<CreateFile> to set a C<HANDLE>, a Win32 native
file handle. So every Perl file handle [like C<STDOUT>] has an integer
file descriptor associated with it that you can get via C<fileno>. And,
under Win32, every file descriptor has a Win32 native file handle
associated with it. C<FdGetOsFHandle> lets you get access to that.

C<$hNativeHandle> is set to C<INVALID_HANDLE_VALUE> [and
C<lastFileError()> and C<$^E> are set] if C<FdGetOsFHandle> fails.
See also C<GetOsFHandle> which provides a friendlier interface.

=head1 cpan/Win32API-File/File.pm chunk 426

C<$ouFlags> will be set to an unsigned value having zero or more of
the bits C<HANDLE_FLAG_INHERIT> and C<HANDLE_FLAG_PROTECT_FROM_CLOSE>
set. See the C<":HANDLE_FLAG_"> export class for the meanings of these
bits.

=head1 cpan/Win32API-File/File.pm chunk 543

C<$uMask> is an unsigned value having one or more of the bits
C<HANDLE_FLAG_INHERIT> and C<HANDLE_FLAG_PROTECT_FROM_CLOSE> set.
Only bits set in C<$uMask> will be modified by C<SetHandleInformation>.

C<$uFlags> is an unsigned value having zero or more of the bits
C<HANDLE_FLAG_INHERIT> and C<HANDLE_FLAG_PROTECT_FROM_CLOSE> set.
For each bit set in C<$uMask>, the cooresponding bit in the handle's
flags is set to the value of the corresponding bit in C<$uFlags>.

=head1 cpan/Win32API-File/File.pm chunk 547

[.at least as far as the C<HANDLE_FLAG_INHERIT> and
C<HANDLE_FLAG_PROTECT_FROM_CLOSE> bits are concerned.]

See the C<":HANDLE_FLAG_"> export class for the meanings of these bits.

=head1 cpan/Win32API-File/File.pm chunk 599

Miscellaneous constants. Used for the C<$uCreate> argument of
C<CreateFile> or the C<$uFromWhere> argument of C<SetFilePointer>.
Plus C<INVALID_HANDLE_VALUE>, which you usually won't need to check
for since most routines translate it into a false value.

CREATE_ALWAYS CREATE_NEW OPEN_ALWAYS
OPEN_EXISTING TRUNCATE_EXISTING INVALID_HANDLE_VALUE
FILE_BEGIN FILE_CURRENT FILE_END

=head1 cpan/Win32API-File/File.pm chunk 627

=item C<":HANDLE_FLAG_">

=head1 cpan/Win32API-File/File.pm chunk 630

=item HANDLE_FLAG_INHERIT

=head1 cpan/Win32API-File/File.pm chunk 632

=item HANDLE_FLAG_PROTECT_FROM_CLOSE

Gosh, but what about the actual code? Now we have at least
these to "fix". Yes, there are a few false positives, but not
many.

1 pod/perl5101delta.pod:C<binmode STDIN, ':raw'> could lead to segmentation faults on some platforms.
2 pod/perl5120delta.pod:C<binmode STDIN, ':raw'> could lead to segmentation faults on some platforms.
3 pod/perl5140delta.pod:provides a standard library to read, interpret and write CPAN distribution
4 pod/perl5140delta.pod:The latest Parse::CPAN::Meta can now read YAML and JSON files using
5 pod/perl5140delta.pod:When C<binmode(FH, ":crlf")> pushes the C<:crlf> layer on top of the stack,
6 pod/perl5140delta.pod: open(FH, ">:pop:perlio", "some.file") or die $!;
7 pod/perl5140delta.pod:L<readline|perlfunc/"readline EXPR"> now honors C<< <> >> overloading on tied
8 pod/perl561delta.pod:C<< open(NEW, "<&OLD") >> now attempts to discard any data that
9 pod/perl561delta.pod:On Unix and similar platforms, system(), qx() and open(FOO, "cmd |")
10 pod/perl561delta.pod: open FOO || die;
11 pod/perl561delta.pod:=item Can't read CRTL environ
12 pod/perl561delta.pod:(W pipe) You used the C<open(FH, "| command")> or C<open(FH, "command |")>
13 pod/perl561delta.pod: open FOO || die;
14 pod/perl56delta.pod:C<< open(NEW, "<&OLD") >> now attempts to discard any data that
15 pod/perl56delta.pod:On Unix and similar platforms, system(), qx() and open(FOO, "cmd |")
16 pod/perl56delta.pod: open FOO || die;
17 pod/perl56delta.pod:=item Can't read CRTL environ
18 pod/perl56delta.pod:(W pipe) You used the C<open(FH, "| command")> or C<open(FH, "command |")>
19 pod/perl56delta.pod: open FOO || die;
20 pod/perl581delta.pod:binmode(SOCKET, ":utf8") only worked on the input side, not on the
21 pod/perl581delta.pod:The "CR CR LF" problem of has been fixed, binmode(FH, ":crlf")
22 pod/perl581delta.pod:These news matter to you only if you either write XS code or like to
23 pod/perl585delta.pod:Perl should now correctly detect and read BOM-marked and (BOMless) UTF-16
24 pod/perl588delta.pod: $rin = fileno(STDIN);
25 pod/perl588delta.pod: vec($rin,fileno(STDIN),1) = 1;
26 pod/perl58delta.pod:to binmode(FH) - which is in turn defined as doing whatever is
27 pod/perl58delta.pod:particular binmode(FH) - and hence C<:raw> - will now turn off both
28 pod/perl58delta.pod: open KID_PS, "-|", "ps", "aux" or die $!;
29 pod/perl58delta.pod:can just use C<binmode(FH)> (nice for pre-5.8.0 backward compatibility).
30 pod/perlcygwin.pod: sysopen(FOO, "bar", O_WRONLY|O_CREAT|O_TEXT)
31 pod/perlcygwin.pod: open(FH, ">:crlf", "out.txt");
32 pod/perldata.pod:C<open(LOG,'logfile')> rather than C<open(log,'logfile')>. Using
33 pod/perldata.pod:line after __DATA__. The program should C<close DATA> when it is done
34 pod/perldata.pod: open (FH, $path) or return undef;
35 pod/perldiag.pod: open(OUT,">$ARGV[0]") or die "Can't write to $ARGV[0]: $!";
36 pod/perldiag.pod: close OUT;
37 pod/perldiag.pod: open FOO || die;
38 pod/perldiag.pod:e.g. open(FH, ">:nosuchlayer", "somefile").
39 pod/perldiag.pod: open FH, '>', $ref;
40 pod/perldiag.pod:(W pipe) You tried to say C<open(CMD, "|cmd|")>, which is not supported.
41 pod/perldiag.pod:=item Can't read CRTL environ
42 pod/perldiag.pod:(W pipe) You used the C<open(FH, "| command")> or
43 pod/perldiag.pod:C<open(FH, "command |")> construction, but the command was missing or
44 pod/perldiag.pod: open FOO || die;
45 pod/perldiag.pod: open(FOO || die);
46 pod/perldiag.pod:output, e.g. C<binmode STDOUT, ':utf8'>. Another way to turn off the
47 pod/perlebcdic.pod: open(FH,"<perlebcdic.pod") or die "Could not open perlebcdic.pod: $!";
48 pod/perlebcdic.pod: open(FH,"<perlebcdic.pod") or die "Could not open perlebcdic.pod: $!";
49 pod/perlebcdic.pod: open(OUT, "> $file") if $file ne "";
50 pod/perlebcdic.pod: close(OUT);
51 pod/perlembed.pod: open FH, $filename or die "open '$filename' $!";
52 pod/perlembed.pod: close FH;
53 pod/perlepoc.pod:socket IO is only implemented poorly. You can only use sysread and
54 pod/perlfilter.pod: open(IN, "<$in") or die "Cannot open file $in: $!\n";
55 pod/perlfilter.pod: open(OUT, ">$out") or die "Cannot open file $out: $!\n";
56 pod/perlfilter.pod: close IN;
57 pod/perlfilter.pod: close OUT;
58 pod/perlfork.pod:The C<open(FOO, "|-")> and C<open(BAR, "-|")> constructs are not yet
59 pod/perlfork.pod: # simulate open(FOO, "|-")
60 pod/perlfork.pod: open(STDIN, "<&=" . fileno($child)) or die;
61 pod/perlfork.pod: close FOO;
62 pod/perlfork.pod: # simulate open(FOO, "-|")
63 pod/perlfork.pod: open(STDOUT, ">&=" . fileno($child)) or die;
64 pod/perlfork.pod: close BAR;
65 pod/perlform.pod:Here's another strategy: Open a pipe to yourself, using C<open(MYSELF, "|-")>
66 pod/perlfunc.pod:=item accept NEWSOCKET,GENERICSOCKET
67 pod/perlfunc.pod: $nread = sysread SOCKET, $buffer, $size;
68 pod/perlfunc.pod:=item bind SOCKET,NAME
69 pod/perlfunc.pod:=item binmode FILEHANDLE, LAYER
70 pod/perlfunc.pod:=item binmode FILEHANDLE
71 pod/perlfunc.pod:=item close FILEHANDLE
72 pod/perlfunc.pod:You don't have to close FILEHANDLE if you are immediately going to do
73 pod/perlfunc.pod:L<open|/open FILEHANDLE>.) However, an explicit C<close> on an input file resets the line
74 pod/perlfunc.pod: open(OUTPUT, '|sort >foo') # pipe to sort
75 pod/perlfunc.pod: close OUTPUT # wait for sort to finish
76 pod/perlfunc.pod: open(INPUT, 'foo') # get sort's results
77 pod/perlfunc.pod:=item eof FILEHANDLE
78 pod/perlfunc.pod:C<eof(FILEHANDLE)> on it) after end-of-file is reached. File types such
79 pod/perlfunc.pod:In a C<< while (<>) >> loop, C<eof> or C<eof(ARGV)> can be used to
80 pod/perlfunc.pod: close ARGV if eof; # Not eof()!
81 pod/perlfunc.pod:=item fileno FILEHANDLE
82 pod/perlfunc.pod: if (fileno(THIS) == fileno(THAT)) {
83 pod/perlfunc.pod:=item flock FILEHANDLE,OPERATION
84 pod/perlfunc.pod: use Fcntl qw(:flock SEEK_END);
85 pod/perlfunc.pod:=item getc FILEHANDLE
86 pod/perlfunc.pod: $key = getc(STDIN);
87 pod/perlfunc.pod:=item listen SOCKET,QUEUESIZE
88 pod/perlfunc.pod:=item open FILEHANDLE,EXPR
89 pod/perlfunc.pod:=item open FILEHANDLE,MODE,EXPR
90 pod/perlfunc.pod:=item open FILEHANDLE,MODE,EXPR,LIST
91 pod/perlfunc.pod:=item open FILEHANDLE,MODE,REFERENCE
92 pod/perlfunc.pod:=item open FILEHANDLE
93 pod/perlfunc.pod: || die "can't open UTF-8 encoded filename: $!";
94 pod/perlfunc.pod: close STDOUT;
95 pod/perlfunc.pod: open(STDOUT, ">", \$variable)
96 pod/perlfunc.pod: or die "Can't open STDOUT: $!";
97 pod/perlfunc.pod: open(ARTICLE) or die "Can't find article $ARTICLE: $!\n";
98 pod/perlfunc.pod: open(LOG, ">>/usr/spool/news/twitlog"); # (log is reserved)
99 pod/perlfunc.pod: open(ARTICLE, "-|", "caesar <$article") # decrypt article
100 pod/perlfunc.pod: open(ARTICLE, "caesar <$article |") # ditto
101 pod/perlfunc.pod: open(EXTRACT, "|sort >Tmp$$") # $$ is our process id
102 pod/perlfunc.pod: open(MEMORY, ">", \$var)
103 pod/perlfunc.pod: open(OLDERR, ">&", \*STDERR) or die "Can't dup STDERR: $!";
104 pod/perlfunc.pod: open(STDOUT, '>', "foo.out") or die "Can't redirect STDOUT: $!";
105 pod/perlfunc.pod: open(STDERR, ">&STDOUT") or die "Can't dup STDOUT: $!";
106 pod/perlfunc.pod: open(STDOUT, ">&", $oldout) or die "Can't dup \$oldout: $!";
107 pod/perlfunc.pod: open(STDERR, ">&OLDERR") or die "Can't dup OLDERR: $!";
108 pod/perlfunc.pod: open(FILEHANDLE, "<&=$fd")
109 pod/perlfunc.pod: open(FILEHANDLE, "<&=", $fd)
110 pod/perlfunc.pod: open(FH, ">>&=", OLDFH)
111 pod/perlfunc.pod: open(FH, ">>&=OLDFH")
112 pod/perlfunc.pod: $child_pid = open(FROM_KID, "-|") // die "can't fork: $!";
113 pod/perlfunc.pod: $child_pid = open(TO_KID, "|-") // die "can't fork: $!";
114 pod/perlfunc.pod: # either write TO_KID or else read FROM_KID
115 pod/perlfunc.pod: open(FOO, "|tr '[a-z]' '[A-Z]'");
116 pod/perlfunc.pod: open(FOO, "|-", "tr '[a-z]' '[A-Z]'");
117 pod/perlfunc.pod: open(FOO, "|-") || exec 'tr', '[a-z]', '[A-Z]';
118 pod/perlfunc.pod: open(FOO, "|-", "tr", '[a-z]', '[A-Z]');
119 pod/perlfunc.pod: open(FOO, "cat -n '$file'|");
120 pod/perlfunc.pod: open(FOO, "-|", "cat -n '$file'");
121 pod/perlfunc.pod: open(FOO, "-|") || exec "cat", "-n", $file;
122 pod/perlfunc.pod: open(FOO, "-|", "cat", "-n", $file);
123 pod/perlfunc.pod: open(FOO, "|cat -n | expand -4 | lpr")
124 pod/perlfunc.pod: open(FH, $filename) or die "Can't open $filename: $!";
125 pod/perlfunc.pod: open(FOO, "<", $file)
126 pod/perlfunc.pod: open(FOO, "< $file\0")
127 pod/perlfunc.pod: open(IN, $ARGV[0]) || die "can't open $ARGV[0]: $!";
128 pod/perlfunc.pod: open(IN, "<", $ARGV[0])
129 pod/perlfunc.pod: sysopen(HANDLE, $path, O_RDWR|O_CREAT|O_EXCL)
130 pod/perlfunc.pod: seek(HANDLE, 0, 0);
131 pod/perlfunc.pod:=item read FILEHANDLE,SCALAR,LENGTH,OFFSET
132 pod/perlfunc.pod:=item read FILEHANDLE,SCALAR,LENGTH
133 pod/perlfunc.pod:Attempts to read LENGTH I<characters> of data into variable SCALAR
134 pod/perlfunc.pod:L<sysread|/sysread FILEHANDLE,SCALAR,LENGTH,OFFSET>.
135 pod/perlfunc.pod:=item readdir DIRHANDLE
136 pod/perlfunc.pod:=item readline EXPR
137 pod/perlfunc.pod:=item recv SOCKET,SCALAR,LENGTH,FLAGS
138 pod/perlfunc.pod:=item seek FILEHANDLE,POSITION,WHENCE
139 pod/perlfunc.pod: seek(TEST,0,1);
140 pod/perlfunc.pod: for ($curpos = tell(FILE); $_ = <FILE>;
141 pod/perlfunc.pod: $curpos = tell(FILE)) {
142 pod/perlfunc.pod: seek(FILE, $curpos, 0);
143 pod/perlfunc.pod:=item seekdir DIRHANDLE,POS
144 pod/perlfunc.pod: vec($rin, fileno(STDIN), 1) = 1;
145 pod/perlfunc.pod: vec($win, fileno(STDOUT), 1) = 1;
146 pod/perlfunc.pod:=item send SOCKET,MSG,FLAGS,TO
147 pod/perlfunc.pod:=item send SOCKET,MSG,FLAGS
148 pod/perlfunc.pod:=item shutdown SOCKET,HOW
149 pod/perlfunc.pod: shutdown(SOCKET, 0); # I/we have stopped reading data
150 pod/perlfunc.pod: shutdown(SOCKET, 1); # I/we have stopped writing data
151 pod/perlfunc.pod: shutdown(SOCKET, 2); # I/we have stopped using this socket
152 pod/perlfunc.pod:=item socket SOCKET,DOMAIN,TYPE,PROTOCOL
153 pod/perlfunc.pod:=item socketpair SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL
154 pod/perlfunc.pod: syscall(&SYS_write, fileno(STDOUT), $s, length $s);
155 pod/perlfunc.pod:=item sysopen FILEHANDLE,FILENAME,MODE
156 pod/perlfunc.pod:=item sysopen FILEHANDLE,FILENAME,MODE,PERMS
157 pod/perlfunc.pod:=item sysread FILEHANDLE,SCALAR,LENGTH,OFFSET
158 pod/perlfunc.pod:=item sysread FILEHANDLE,SCALAR,LENGTH
159 pod/perlfunc.pod:Attempts to read LENGTH bytes of data into variable SCALAR from the
160 pod/perlfunc.pod:=item sysseek FILEHANDLE,POSITION,WHENCE
161 pod/perlfunc.pod:=item syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET
162 pod/perlfunc.pod:=item syswrite FILEHANDLE,SCALAR,LENGTH
163 pod/perlfunc.pod:=item syswrite FILEHANDLE,SCALAR
164 pod/perlfunc.pod:Attempts to write LENGTH bytes of data from variable SCALAR to the
165 pod/perlfunc.pod:=item tell FILEHANDLE
166 pod/perlfunc.pod:There is no C<systell> function. Use C<sysseek(FH, 0, 1)> for that.
167 pod/perlfunc.pod:=item telldir DIRHANDLE
168 pod/perlfunc.pod:=item truncate FILEHANDLE,LENGTH
169 pod/perlfunc.pod:=item truncate EXPR,LENGTH
170 pod/perlfunc.pod:call L<seek|/"seek FILEHANDLE,POSITION,WHENCE"> before writing to the file.
171 pod/perlfunc.pod:=item write FILEHANDLE
172 pod/perlfunc.pod:=item write EXPR
173 pod/perlhack.pod:can be called like built-in functions, you can even write XS code to
174 pod/perliol.pod:The layer is acceptable to have in a binmode(FH) stack - i.e. it does not
175 pod/perliol.pod:of binmode(FH)). If not present layer will be popped. If present
176 pod/perlipc.pod: flock(FH, 2) # blocking write lock
177 pod/perlipc.pod: open (FIFO, "> $FIFO") || die "can't open $FIFO: $!";
178 pod/perlipc.pod: close(FIFO) || die "can't close $FIFO: $!";
179 pod/perlipc.pod: open(SPOOLER, "| cat -v | lpr -h 2>/dev/null")
180 pod/perlipc.pod: close SPOOLER || die "bad spool: $! $?";
181 pod/perlipc.pod: open(STATUS, "netstat -an 2>&1 |")
182 pod/perlipc.pod: close STATUS || die "bad netstat: $! $?";
183 pod/perlipc.pod: open(FH, "|bogus") || die "can't fork: $!";
184 pod/perlipc.pod: close(FH) || die "can't close: $!";
185 pod/perlipc.pod: open(FH, "|bogus") || die "can't fork: $!";
186 pod/perlipc.pod: close(FH) || die "can't close: status=$?";
187 pod/perlipc.pod: open(STDIN, "< /dev/null") || die "can't read /dev/null: $!";
188 pod/perlipc.pod: open(STDOUT, "> /dev/null") || die "can't write to /dev/null: $!";
189 pod/perlipc.pod: open(STDERR, ">&STDOUT") || die "can't dup stdout: $!";
190 pod/perlipc.pod: $pid = open(KID_TO_WRITE, "|-");
191 pod/perlipc.pod: close(KID_TO_WRITE) || warn "kid exited $?";
192 pod/perlipc.pod: open (OUTFILE, "> $PRECIOUS")
193 pod/perlipc.pod: close(OUTFILE) || die "can't close $PRECIOUS: $!";
194 pod/perlipc.pod: my $pid = open(KID_TO_READ, "-|");
195 pod/perlipc.pod: close(KID_TO_READ) || warn "kid exited $?";
196 pod/perlipc.pod: my $pid = open(KID_TO_WRITE, "|-");
197 pod/perlipc.pod: close(KID_TO_WRITE) || warn "kid exited $?";
198 pod/perlipc.pod:In particular, if you opened the pipe using C<open FH, "|-">, then you
199 pod/perlipc.pod: my $pid = open(WRITER, "|-"); # fork open a kid
200 pod/perlipc.pod: close(WRITER) || die "couldn't close WRITER: $!";
201 pod/perlipc.pod: close(WRITER) || die "couldn't close WRITER: $!";
202 pod/perlipc.pod:C<open FH, "|-">, it has a special behavior: closing it calls
203 pod/perlipc.pod: close READER;
204 pod/perlipc.pod: close(WRITER) || die "can't close WRITER: $!";
205 pod/perlipc.pod: close(WRITER) || die "can't close WRITER: $!";
206 pod/perlipc.pod: open(STDIN, "<&READER") || die "can't reopen STDIN: $!";
207 pod/perlipc.pod: close(WRITER) || die "can't close WRITER: $!";
208 pod/perlipc.pod: open(PS_PIPE, "ps aux|") || die "can't open ps pipe: $!";
209 pod/perlipc.pod: open(PS_PIPE, "-|", "ps", "aux")
210 pod/perlipc.pod: open(PS_PIPE, "-|", @ps_args)
211 pod/perlipc.pod: open(GREP_PIPE, "-|", @grep_args)
212 pod/perlipc.pod:with the pipe open must close it for it to read EOF.
213 pod/perlipc.pod: open(PROG_FOR_READING_AND_WRITING, "| some program |")
214 pod/perlipc.pod: close PARENT_RDR;
215 pod/perlipc.pod: close PARENT_WTR;
216 pod/perlipc.pod: close CHILD_RDR; close CHILD_WTR;
217 pod/perlipc.pod: close CHILD_RDR;
218 pod/perlipc.pod: close CHILD_WTR;
219 pod/perlipc.pod: close PARENT_RDR;
220 pod/perlipc.pod: close PARENT_WTR;
221 pod/perlipc.pod: socketpair(CHILD, PARENT, AF_UNIX, SOCK_STREAM, PF_UNSPEC)
222 pod/perlipc.pod: close PARENT;
223 pod/perlipc.pod: close CHILD;
224 pod/perlipc.pod: close CHILD;
225 pod/perlipc.pod: close PARENT;
226 pod/perlipc.pod: socket(SOCK, PF_INET, SOCK_STREAM, $proto) || die "socket: $!";
227 pod/perlipc.pod: close (SOCK) || die "close: $!";
228 pod/perlipc.pod: open(STDIN, "<&Client") || die "can't dup client to stdin";
229 pod/perlipc.pod: open(STDOUT, ">&Client") || die "can't dup client to stdout";
230 pod/perlipc.pod: ## open(STDERR, ">&STDOUT") || die "can't dup stdout to stderr";
231 pod/perlipc.pod: socket(SOCKET, PF_INET, SOCK_STREAM, $proto)
232 pod/perlipc.pod: read(SOCKET, $rtime, 4);
233 pod/perlipc.pod: close(SOCKET);
234 pod/perlipc.pod: socket(SOCK, PF_UNIX, SOCK_STREAM, 0) || die "socket: $!";
235 pod/perlipc.pod: open(STDIN, "<&Client") || die "can't dup client to stdin";
236 pod/perlipc.pod: open(STDOUT, ">&Client") || die "can't dup client to stdout";
237 pod/perlipc.pod: ## open(STDERR, ">&STDOUT") || die "can't dup stdout to stderr";
238 pod/perlipc.pod: kill("TERM", $kidpid); # send SIGTERM to child
239 pod/perlipc.pod: socket(SOCKET, PF_INET, SOCK_DGRAM, $proto) || die "socket: $!";
240 pod/perlipc.pod: bind(SOCKET, $paddr) || die "bind: $!";
241 pod/perlipc.pod: defined(send(SOCKET, 0, 0, $hispaddr)) || die "send $host: $!";
242 pod/perlipc.pod: vec($rin, fileno(SOCKET), 1) = 1;
243 pod/perlipc.pod: $hispaddr = recv(SOCKET, $rtime, 4, 0) || die "recv: $!";
244 pod/perlop.pod: close ARGV if eof; # reset $. each file
245 pod/perlop.pod: open HANDLE, "< :utf8", "filename" or die "Can't open: $!\n";
246 pod/perlop.pod: open(HANDLE, "< :utf8", "filename") or die "Can't open: $!\n";
247 pod/perlop.pod: open(HANDLE, "< :utf8", "filename") || die "Can't open: $!\n";
248 pod/perlop.pod: open(TTY, "+</dev/tty")
249 pod/perlop.pod: open(SPLAT, "stuff") || die "can't open stuff: $!";
250 pod/perlop.pod: open(STDIN, "<&SPLAT") || die "can't dupe SPLAT: $!";
251 pod/perlop.pod: open(ARGV, $ARGV);
252 pod/perlop.pod: open(FOO, "echo *.c | tr -s ' \t\r\f' '\\012\\012\\012\\012'|");
253 pod/perlopentut.pod: open(INFO, "datafile") || die("can't open datafile: $!");
254 pod/perlopentut.pod: open(INFO, "< datafile") || die("can't open datafile: $!");
255 pod/perlopentut.pod: open(RESULTS,"> runstats") || die("can't open runstats: $!");
256 pod/perlopentut.pod: open(LOG, ">> logfile ") || die("can't open logfile: $!");
257 pod/perlopentut.pod: open INFO, "< datafile" or die "can't open datafile: $!";
258 pod/perlopentut.pod: open RESULTS,"> runstats" or die "can't open runstats: $!";
259 pod/perlopentut.pod: open LOG, ">> logfile " or die "can't open logfile: $!";
260 pod/perlopentut.pod: open INFO, ( "< datafile" || die "can't open datafile: $!" );
261 pod/perlopentut.pod: open INFO, "<datafile"
262 pod/perlopentut.pod: open INFO, "< datafile"
263 pod/perlopentut.pod: open INFO, "< datafile"
264 pod/perlopentut.pod: open(EXTRA, "< $filename") || die "can't open $filename: $!";
265 pod/perlopentut.pod: open( INFO, ">", $datafile ) || die "Can't create $datafile: $!";
266 pod/perlopentut.pod: open(PRINTER, "| lpr -Plp1") || die "can't run lpr: $!";
267 pod/perlopentut.pod: close(PRINTER) || die "can't close lpr: $!";
268 pod/perlopentut.pod: open(NET, "netstat -i -n |") || die "can't fork netstat: $!";
269 pod/perlopentut.pod: close(NET) || die "can't close netstat: $!";
270 pod/perlopentut.pod: open(WTMP, "+< /usr/adm/wtmp")
271 pod/perlopentut.pod: open(SCREEN, "+> lkscreen")
272 pod/perlopentut.pod: open(LOGFILE, "+>> /var/log/applog")
273 pod/perlopentut.pod: open(PWD, $pwdinfo)
274 pod/perlopentut.pod: sysopen HANDLE, PATH, FLAGS, [MASK]
275 pod/perlopentut.pod: open(FH, "< $path");
276 pod/perlopentut.pod: sysopen(FH, $path, O_RDONLY);
277 pod/perlopentut.pod: open(FH, "> $path");
278 pod/perlopentut.pod: sysopen(FH, $path, O_WRONLY | O_TRUNC | O_CREAT);
279 pod/perlopentut.pod: open(FH, ">> $path");
280 pod/perlopentut.pod: sysopen(FH, $path, O_WRONLY | O_APPEND | O_CREAT);
281 pod/perlopentut.pod: open(FH, "+< $path");
282 pod/perlopentut.pod: sysopen(FH, $path, O_RDWR);
283 pod/perlopentut.pod: sysopen(FH, $path, O_WRONLY | O_EXCL | O_CREAT);
284 pod/perlopentut.pod: sysopen(FH, $path, O_WRONLY | O_APPEND);
285 pod/perlopentut.pod: sysopen(FH, $path, O_RDWR | O_CREAT);
286 pod/perlopentut.pod: sysopen(FH, $path, O_RDWR | O_EXCL | O_CREAT);
287 pod/perlopentut.pod: sysopen(FH, $path, O_WRONLY | O_NONBLOCK | O_CREAT);
288 pod/perlopentut.pod: open(SAVEOUT, ">&SAVEERR") || die "couldn't dup SAVEERR: $!";
289 pod/perlopentut.pod: open(MHCONTEXT, "<&4") || die "couldn't dup fd4: $!";
290 pod/perlopentut.pod: die "can't connect" unless defined(fileno(REMOTE));
291 pod/perlopentut.pod: open(MHCONTEXT, "<&=$fd") or die "couldn't fdopen $fd: $!";
292 pod/perlopentut.pod: open(FH, "< $file\0") || die "can't open $file: $!";
293 pod/perlopentut.pod: open FILE or die "can't open $FILE: $!";
294 pod/perlopentut.pod: END { close(STDOUT) || die "can't close stdout: $!" }
295 pod/perlopentut.pod: open(STDIN, "< datafile")
296 pod/perlopentut.pod: open(STDOUT, "> output")
297 pod/perlopentut.pod: open(STDOUT, "| $pager")
298 pod/perlopentut.pod: return if $pid = open(STDOUT, "|-"); # return if parent
299 pod/perlopentut.pod: while (defined($file = readdir(DIR))) {
300 pod/perlopentut.pod: sysopen(TTYIN, "/dev/ttyS1", O_RDWR | O_NDELAY | O_NOCTTY)
301 pod/perlopentut.pod: open(TTYOUT, "+>&TTYIN")
302 pod/perlopentut.pod: binmode(STDIN);
303 pod/perlopentut.pod: binmode(STDOUT);
304 pod/perlopentut.pod: sysopen(BINDAT, "records.data", O_RDWR | O_BINARY)
305 pod/perlopentut.pod: while (sysread(WHENCE, $buf, 1024)) {
306 pod/perlopentut.pod: syswrite(WHITHER, $buf, length($buf));
307 pod/perlopentut.pod: open(FH, "< filename") or die "can't open filename: $!";
308 pod/perlopentut.pod: flock(FH, LOCK_SH) or die "can't lock filename: $!";
309 pod/perlopentut.pod: flock(FH, LOCK_SH | LOCK_NB)
310 pod/perlopentut.pod: open(FH, "< filename") or die "can't open filename: $!";
311 pod/perlopentut.pod: unless (flock(FH, LOCK_SH | LOCK_NB)) {
312 pod/perlopentut.pod: flock(FH, LOCK_SH) or die "can't lock filename: $!";
313 pod/perlopentut.pod: sysopen(FH, "filename", O_WRONLY | O_CREAT)
314 pod/perlopentut.pod: flock(FH, LOCK_EX)
315 pod/perlopentut.pod: truncate(FH, 0)
316 pod/perlopentut.pod: sysopen(FH, "numfile", O_RDWR | O_CREAT)
317 pod/perlopentut.pod: flock(FH, LOCK_EX)
318 pod/perlopentut.pod: seek(FH, 0, 0)
319 pod/perlopentut.pod: truncate(FH, tell(FH))
320 pod/perlopentut.pod: close(FH)
321 pod/perlos2.pod:read EMX docs to see how to do it.
322 pod/perlos2.pod:C<open FH, "|-">
323 pod/perlos2.pod:C<open FH, "-|">, in other words, opening pipes to itself.
324 pod/perlpodstyle.pod:These are general guidelines for how to write POD documentation for Perl
325 pod/perlpodstyle.pod:CE<lt>accept(IE<lt>NEWSOCKETE<gt>, E<lt>GENERICSOCKETE<gt>)E<gt>
326 pod/perlport.pod: open(MAIL, '|/usr/lib/sendmail -t')
327 pod/perlport.pod:and writing to files (see L<"Newlines">). C<binmode(FILEHANDLE)>
328 pod/perlport.pod:C<open(FH, 'A')>).
329 pod/perlport.pod:mode (i.e., use C<<< open(FH, '>>filename') >>>
330 pod/perlport.pod:or C<sysopen(FH,...,O_APPEND|O_RDWR)>. If a filename is supplied, it
331 pod/perlrun.pod: open(ARGVOUT, ">$ARGV");
332 pod/perlsec.pod: open FOO, "/home/me/bar" or die $!;
333 pod/perlsec.pod: open(FOO, "< $arg"); # OK - read-only file
334 pod/perlsec.pod: open(FOO, "> $arg"); # Not OK - trying to write
335 pod/perlsec.pod: open(FOO,"echo $arg|"); # Not OK
336 pod/perlsec.pod: open(FOO,"-|")
337 pod/perlsec.pod: die "Can't fork: $!" unless defined($pid = open(KID, "-|"));
338 pod/perlsec.pod: close KID;
339 pod/perlstyle.pod: open(FOO,$foo) || die "Can't open $foo: $!";
340 pod/perlstyle.pod: die "Can't open $foo: $!" unless open(FOO,$foo);
341 pod/perlsub.pod: return open (FH, $path) ? *FH : undef;
342 pod/perlsyn.pod: if (!open(FOO)) { die "Can't open $FOO: $!" }
343 pod/perlsyn.pod: die "Can't open $FOO: $!" unless open(FOO);
344 pod/perlsyn.pod: open(FOO) || die "Can't open $FOO: $!";
345 pod/perlsyn.pod: open(FOO) ? () : die "Can't open $FOO: $!";
346 pod/perlsyn.pod: redo LINE unless eof(); # not eof(ARGV)!
347 pod/perlsyn.pod: close ARGV if eof; # reset $.
348 pod/perltie.pod: foreach $dot ( grep /^\./ && -f "$dir/$_", readdir(DIR)) {
349 pod/perltie.pod:or C<readline HANDLE>.
350 pod/perltie.pod:a filehandle as a parameter, e.g. C<eof(FH)>; and C<2> in the very special
351 pod/perltoc.pod:=item Why can't I just open(FH, "E<gt>file.lock")?
352 pod/perltoc.pod:SOCKET,NAME X<bind>, binmode FILEHANDLE, LAYER X<binmode> X<binary> X<text>
353 pod/perltoc.pod:X<DOS> X<Windows>, binmode FILEHANDLE, bless REF,CLASSNAME X<bless>, bless
354 pod/perltoc.pod:X<array, iterator>, each EXPR, eof FILEHANDLE X<eof> X<end of file>
355 pod/perltoc.pod:X<fcntl>, __FILE__ X<__FILE__>, fileno FILEHANDLE X<fileno>, flock
356 pod/perltoc.pod:X<link>, listen SOCKET,QUEUESIZE X<listen>, local EXPR X<local>, localtime
357 pod/perltoc.pod:FILEHANDLE,MODE,EXPR, open FILEHANDLE,MODE,EXPR,LIST, open
358 pod/perltoc.pod:FILEHANDLE,MODE,REFERENCE, open FILEHANDLE, opendir DIRHANDLE,EXPR
359 pod/perltoc.pod:X<random>, rand, read FILEHANDLE,SCALAR,LENGTH,OFFSET X<read> X<file,
360 pod/perltoc.pod:read>, read FILEHANDLE,SCALAR,LENGTH, readdir DIRHANDLE X<readdir>,
361 pod/perltoc.pod:readline EXPR, readline X<readline> X<gets> X<fgets>, readlink EXPR
362 pod/perltoc.pod:seekdir DIRHANDLE,POS X<seekdir>, select FILEHANDLE X<select> X<filehandle,
363 pod/perltoc.pod:KEY,OPSTRING X<semop>, send SOCKET,MSG,FLAGS,TO X<send>, send
364 pod/perltoc.pod:ID,STRING,POS,SIZE, shutdown SOCKET,HOW X<shutdown>, sin EXPR X<sin>
365 pod/perltoc.pod:socket SOCKET,DOMAIN,TYPE,PROTOCOL X<socket>, socketpair
366 pod/perltoc.pod:FILEHANDLE,FILENAME,MODE,PERMS, sysread FILEHANDLE,SCALAR,LENGTH,OFFSET
367 pod/perltoc.pod:X<sysread>, sysread FILEHANDLE,SCALAR,LENGTH, sysseek
368 pod/perltoc.pod:X<shell>, system PROGRAM LIST, syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET
369 pod/perltoc.pod:X<syswrite>, syswrite FILEHANDLE,SCALAR,LENGTH, syswrite FILEHANDLE,SCALAR,
370 pod/perltoc.pod:tell FILEHANDLE X<tell>, tell, telldir DIRHANDLE X<telldir>, tie
371 pod/perltoc.pod:X<epoch>, times X<times>, tr///, truncate FILEHANDLE,LENGTH X<truncate>,
372 pod/perltoc.pod:truncate EXPR,LENGTH, uc EXPR X<uc> X<uppercase> X<toupper>, uc, ucfirst
373 pod/perltoc.pod:FILEHANDLE X<write>, write EXPR, write, y///
374 pod/perltoc.pod:Can't modify non-lvalue subroutine call, Can't read CRTL environ, Can't
375 pod/perltoc.pod:Can't modify non-lvalue subroutine call, Can't read CRTL environ, Can't
376 pod/perltoc.pod:File tests, backticks, binmode FILEHANDLE, crypt PLAINTEXT, USER, die,
377 pod/perltoc.pod:new ( [ DIRNAME ] ), open ( DIRNAME ), read (), seek ( POS ), tell (),
378 pod/perltoc.pod:open( FILENAME [,MODE [,PERMS]] ), open( FILENAME, IOLAYERS ), binmode(
379 pod/perltoc.pod:$io->ungetc ( ORD ), $io->write ( BUF, LEN [, OFFSET ] ), $io->error,
380 pod/perltoc.pod:$io->getpos, $io->setpos, $io->seek ( POS, WHENCE ), WHENCE=0 (SEEK_SET),
381 pod/perltoc.pod:WHENCE=1 (SEEK_CUR), WHENCE=2 (SEEK_END), $io->sysseek( POS, WHENCE ),
382 pod/perltoc.pod:accept([PKG]), socketpair(DOMAIN, TYPE, PROTOCOL), atmark, connected,
383 pod/perltoc.pod:open ( FILENAME, MODE ), opened, close, getc, getline, getlines, print (
384 pod/perltoc.pod:ARGS... ), read ( BUF, NBYTES, [OFFSET] ), eof, seek ( OFFSET, WHENCE ),
385 pod/perltoc.pod:new ( KEY , SIZE , FLAGS ), id, read ( POS, SIZE ), write ( STRING, POS,
386 pod/perltoc.pod:read ( BUFFER, SIZE [, TIMEOUT ] ), write ( BUFFER, SIZE [, TIMEOUT ] ),
387 pod/perltoc.pod:USERNAME, PASSWORD ), mail ( ADDRESS [, OPTIONS] ), send ( ADDRESS ),
388 pod/perltrap.pod: open FOO || die;
389 pod/perltrap.pod: open(FOO || die);
390 pod/perltrap.pod: open(TEST,">>seek.test");
391 pod/perltrap.pod: $start = tell TEST;
392 pod/perltrap.pod: $end = tell TEST;
393 pod/perltrap.pod: seek(TEST,$start,0);
394 pod/perlunicode.pod:A filehandle that should read or write UTF-8
395 pod/perlunifaq.pod: binmode STDOUT, ":encoding(UTF-8)";
396 pod/perluniintro.pod: binmode(STDOUT, ":utf8");
397 pod/perluniintro.pod: open FH, ">:utf8", "file";
398 pod/perluniintro.pod: open FH, ">:encoding(ucs2)", "file";
399 pod/perluniintro.pod: open FH, ">:encoding(UTF-8)", "file";
400 pod/perluniintro.pod: open FH, ">:encoding(shift_jis)", "file";
401 pod/perluniintro.pod: binmode(STDOUT, ":utf8");
402 pod/perluniintro.pod: binmode(STDOUT, ":encoding(ucs2)");
403 pod/perluniintro.pod: binmode(STDOUT, ":encoding(UTF-8)");
404 pod/perluniintro.pod: binmode(STDOUT, ":encoding(shift_jis)");
405 pod/perluniintro.pod: use open OUT => ':locale'; # russki parusski
406 pod/perlunitut.pod: my $bar = decode('ISO-8859-1', readline STDIN);
407 pod/perlvar.pod: close(LOG);
408 pod/perlvms.pod:=item binmode FILEHANDLE
409 ext/B/B/Concise.pm: # in 5.8+, open(FILEHANDLE,MODE,REFERENCE) writes to string
410 ext/B/B/Concise.pm:# distracting if you're trying to tell OPs apart. Therefore we'd like to
411 ext/B/B/Xref.pm: open(STDOUT, ">$arg") or return "$arg: $!\n";
412 ext/B/O.pm: open (SAVEOUT, ">&STDOUT");
413 ext/B/O.pm: close STDOUT;
414 ext/B/O.pm: open (STDOUT, ">", \$O::BEGIN_output);
415 ext/B/O.pm: close STDOUT;
416 ext/B/O.pm: open (STDOUT, ">&SAVEOUT");
417 ext/B/O.pm: close SAVEOUT;
418 ext/B/O.pm: close STDERR if $veryquiet;
419 ext/Errno/Errno.pm: unless (open(FH, "/fangorn/spouse")) {
420 ext/IPC-Open3/lib/IPC/Open2.pm: $pid = open(HANDLE, "|cmd args|");
421 ext/IPC-Open3/lib/IPC/Open3.pm:C<open(FOO, "-|")> the child process will just be the forked Perl
422 ext/IPC-Open3/lib/IPC/Open3.pm: if defined fileno STDERR && fileno STDERR != fileno STDOUT;
423 ext/Opcode/Opcode.pm: close(DATA);
424 ext/Pod-Functions/Functions.pm:close DATA;
425 ext/POSIX/lib/POSIX.pm: getchar => 'CORE::getc(STDIN)',
426 lib/App/Cpan.pm: return unless open FILE, "<$file";
427 lib/App/Cpan.pm: close FILE;
428 lib/App/Prove/State.pm: open FH, ">$store" or croak "Can't write $store ($!)";
429 lib/App/Prove/State.pm: close FH;
430 lib/App/Prove/State.pm: open FH, "<$name" or croak "Can't read $name ($!)";
431 lib/App/Prove/State.pm: close FH;
432 lib/App/Prove.pm: open RC, "<$rc_file" or croak "Can't read $rc_file ($!)";
433 lib/App/Prove.pm: close RC;
434 lib/B/Concise.pm: # in 5.8+, open(FILEHANDLE,MODE,REFERENCE) writes to string
435 lib/B/Concise.pm:# distracting if you're trying to tell OPs apart. Therefore we'd like to
436 lib/B/Xref.pm: open(STDOUT, ">$arg") or return "$arg: $!\n";
437 lib/CGI/Carp.pm: open(LOG, ">>/usr/local/cgi-logs/mycgi-log") or
438 lib/CGI/Carp.pm:The quick way to do that is to tell CGI::Carp the name of the program
439 lib/CGI/Carp.pm:1.27 Replaced tell STDOUT with bytes=tell STDOUT.
440 lib/CGI/Carp.pm: open(SAVEERR, ">&STDERR");
441 lib/CGI/Carp.pm: open(STDERR, ">&$no") or
442 lib/CGI/Carp.pm: my $bytes_written = eval{tell STDOUT};
443 lib/CGI.pm:# doesn't accept CRLF -- instead it wants a LR. EBCDIC machines don't
444 lib/CGI.pm: open (IN,"test.in") || die;
445 lib/CGI.pm: close IN;
446 lib/CGI.pm: open (OUT,'>>','test.out') || die;
447 lib/CGI.pm: close OUT;
448 lib/CGI.pm: open (IN,'<','test.out') || die;
449 lib/CGI.pm: while (!eof(IN)) {
450 lib/CGI.pm:don't want it to read CGI parameters from the command line or STDIN,
451 lib/CGI.pm: open (OUTFILE,'>>','/usr/local/web/users/feedback');
452 lib/Compress/Raw/Zlib.pm: binmode STDIN;
453 lib/Compress/Raw/Zlib.pm: binmode STDOUT;
454 lib/Compress/Raw/Zlib.pm: binmode STDIN;
455 lib/Compress/Raw/Zlib.pm: binmode STDOUT;
456 lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
457 lib/Compress/Raw/Zlib.pm: binmode STDIN;
458 lib/Compress/Raw/Zlib.pm: binmode STDOUT;
459 lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
460 lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
461 lib/Compress/Raw/Zlib.pm: binmode STDIN;
462 lib/Compress/Raw/Zlib.pm: binmode STDOUT;
463 lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
464 lib/Compress/Zlib.pm: binmode STDOUT; # gzopen only sets it on the fd
465 lib/Compress/Zlib.pm: binmode STDIN;
466 lib/Compress/Zlib.pm: binmode STDOUT;
467 lib/Compress/Zlib.pm: binmode STDIN;
468 lib/Compress/Zlib.pm: binmode STDOUT;
469 lib/Compress/Zlib.pm: while (read(STDIN, $input, 4096))
470 lib/CPAN/Distribution.pm: open FH, $system or die "Could not fork '$system': $!";
471 lib/CPAN/Distribution.pm: return undef; # if we die, then we cannot read YAML's own META.yml
472 lib/CPAN/Distribution.pm: open FH, $build_prereqs
473 lib/CPAN/Distribution.pm: $pid = open README, "which $binary|"
474 lib/CPAN/Distribution.pm: close README
475 lib/CPAN/Distribution.pm: $pid = open README, "$html_converter $saved_file |"
476 lib/CPAN/Distribution.pm: close README or
477 lib/CPAN/Distribution.pm: open FH, $tmpin
478 lib/CPAN/Distribution.pm: "Will not send CPAN Testers report with generated Makefile.PL.\n"
479 lib/CPAN/Distroprefs.pm: open FH, "<$abs" or die $result->as_fatal(msg => "$!");
480 lib/CPAN/Distroprefs.pm: close FH;
481 lib/CPAN/FTP.pm: open FH, $aslocal or die;
482 lib/CPAN/Kwalify.pm: open FH, $path or die "Could not open '$path': $!";
483 lib/CPAN/Kwalify.pm: open FH, $path or die "Could not open '$path': $!";
484 lib/CPAN/Meta/YAML.pm: unless ( open(CFG, $file) ) {
485 lib/CPAN/Meta/YAML.pm: unless ( close(CFG) ) {
486 lib/CPAN/Meta/YAML.pm: open( CFG, '>' . $file ) or return $self->_error(
487 lib/CPAN/Meta/YAML.pm: close CFG;
488 lib/CPAN.pm: open(STDOUT,">$m$_") or die "open:$_:$!\n";
489 lib/CPAN.pm: open(STDOUT,$pipe) or die "open:$pipe:$!\n";
490 lib/CPAN.pm: close(STDOUT);
491 lib/CPAN.pm: open(STDOUT,">&SAVEOUT");
492 lib/CPAN.pm: open FH, $local_file or die "Could not open '$local_file': $!";
493 lib/CPAN.pm: open FH, ">$local_file" or die "Could not open '$local_file': $!";
494 lib/CPAN.pm: yaml_module which module to use to read/write YAML files
495 lib/CPANPLUS/Internals/Report.pm: ### -- if not, send NA grade
496 lib/CPANPLUS/Internals/Report.pm: ### -- send NA grade.
497 lib/CPANPLUS/Module.pm: my @count = readdir(DIR);
498 lib/CPANPLUS/Module.pm: close DIR;
499 lib/CPANPLUS/Shell/Default/Plugins/CustomSource.pm: ' /cs --write PATH # write source index' . $/
500 lib/Cwd.pm: $direntry = readdir(DIR);
501 lib/Cwd.pm: unless (defined ($dir = readdir(PARENT)))
502 lib/Cwd.pm: defined( open(REALPATH, '-|') || exec '/usr/bin/fullpath', '-t', $path ) or
503 lib/Cwd.pm: close REALPATH;
504 lib/DB_File.pm: open(FH, ">$arg[1]") or return undef ;
505 lib/DB_File.pm: close FH ;
506 lib/DB_File.pm: open(DB_FH, "+<&=$fd") || die "dup $!";
507 lib/DB_File.pm: flock (DB_FH, LOCK_EX) || die "flock: $!";
508 lib/DB_File.pm: flock(DB_FH, LOCK_UN);
509 lib/DB_File.pm: close(DB_FH);
510 lib/Devel/PPPort.pm: unless (open IN, "<$filename") {
511 lib/Devel/PPPort.pm: close IN;
512 lib/Devel/PPPort.pm: if (open PATCH, ">$opt{patch}") {
513 lib/Devel/PPPort.pm:close PATCH if $patch_opened;
514 lib/Devel/PPPort.pm: open OUT, ">$0" or die "cannot strip $0: $!\n";
515 lib/diagnostics.pm: if (open(POD_DIAG, $PODFILE)) {
516 lib/diagnostics.pm: if (open(POD_DIAG, $file)) {
517 lib/diagnostics.pm:if (eof(POD_DIAG)) {
518 lib/diagnostics.pm: close POD_DIAG unless *main::DATA eq *POD_DIAG;
519 lib/Digest/MD5.pm: open(FILE, $file) or die "Can't open '$file': $!";
520 lib/Digest/MD5.pm: binmode(FILE);
521 lib/Digest/MD5.pm: close(FILE);
522 lib/Digest/MD5.pm: open(FILE, $file) or die "Can't open '$file': $!";
523 lib/Digest/MD5.pm: binmode(FILE);
524 lib/Digest/SHA.pm: $file eq '-' and open(FH, '< -')
525 lib/Digest/SHA.pm: or sysopen(FH, $file, O_RDONLY)
526 lib/Digest/SHA.pm: while (($n = read(FH, $buf, 4096))) {
527 lib/Digest/SHA.pm: close(FH);
528 lib/Digest/SHA.pm: binmode(FH) if $binary || $portable;
529 lib/Digest/SHA.pm: close(FH);
530 lib/Digest/SHA.pm: while (($n1 = read(FH, $buf1, 4096))) {
531 lib/Digest/SHA.pm: $n2 = read(FH, $buf2, 4096);
532 lib/Digest/SHA.pm: close(FH);
533 lib/DirHandle.pm: @_ == 2 or croak 'usage: $dh->open(DIRNAME)';
534 lib/Encode.pm: open(INPUT, "< :encoding(shiftjis)", $infile)
535 lib/Encode.pm: open(OUTPUT, "> :encoding(euc-jp)", $outfile)
536 lib/Encode.pm: close(INPUT) || die "can't close $infile: $!";
537 lib/Encode.pm: close(OUTPUT) || die "can't close $outfile: $!";
538 lib/Encode.pm: open(INPUT, "< :raw", $infile)
539 lib/Encode.pm: open(OUTPUT, "> :raw", $outfile)
540 lib/Encode.pm: close(INPUT) || die "can't close $infile: $!";
541 lib/Encode.pm: close(OUTPUT) || die "can't close $outfile: $!";
542 lib/encoding.pm: binmode( STDIN, ":raw" );
543 lib/encoding.pm: binmode( STDOUT, ":raw" );
544 lib/encoding.pm: binmode(STDIN);
545 lib/encoding.pm: binmode(STDOUT);
546 lib/encoding.pm: binmode(STDOUT=>':encoding(utf8)'); # bang!
547 lib/Errno.pm: unless (open(FH, "/fangorn/spouse")) {
548 lib/ExtUtils/Command.pm: open(FILE,">>$file") || die "Cannot write $file:$!";
549 lib/ExtUtils/Command.pm: close(FILE);
550 lib/ExtUtils/Command.pm: open ORIG, $_ or do { warn "dos2unix can't open $_: $!"; return };
551 lib/ExtUtils/Command.pm: open TEMP, ">$temp" or
552 lib/ExtUtils/Command.pm: close ORIG;
553 lib/ExtUtils/Command.pm: close TEMP;
554 lib/ExtUtils/Embed.pm: if(open(FH, $extra)) {
555 lib/ExtUtils/Install.pm: open(CMD, "|$cmd >$dest") || die "Cannot fork: $!";
556 lib/ExtUtils/Install.pm: open(SRC, $src) || die "Cannot open $src: $!";
557 lib/ExtUtils/Install.pm: while (my $len = sysread(SRC, $buf, $sz)) {
558 lib/ExtUtils/Install.pm: syswrite(CMD, $buf, $len);
559 lib/ExtUtils/Install.pm: close SRC;
560 lib/ExtUtils/Install.pm: close CMD or die "Filter command '$cmd' failed for $src";
561 lib/ExtUtils/Installed.pm: if (open PACKFH, $file) {
562 lib/ExtUtils/Installed.pm: close PACKFH;
563 lib/ExtUtils/Liblist.pm: my @out = grep /$rex/, readdir DIR;
564 lib/ExtUtils/MakeMaker.pm: if ($ENV{PERL_MM_USE_DEFAULT} || (!$isa_tty && eof STDIN)) {
565 lib/ExtUtils/Manifest.pm: open(MANIFEST, ">>$MANIFEST") or
566 lib/ExtUtils/Manifest.pm: close MANIFEST or die "Error closing $MANIFEST: $!";
567 lib/ExtUtils/Manifest.pm: open MANIFEST, $MANIFEST or die "Could not open $MANIFEST: $!";
568 lib/ExtUtils/Manifest.pm: close MANIFEST;
569 lib/ExtUtils/Manifest.pm: open MANIFEST, ">", $MANIFEST or die "(must_rewrite=$must_rewrite) Could not open >$MANIFEST: $!";
570 lib/ExtUtils/Manifest.pm: close MANIFEST or die "could not write $MANIFEST: $!";
571 lib/ExtUtils/MM_Unix.pm: if( open(STDERR_COPY, '>&STDERR') ) { ## no critic
572 lib/ExtUtils/MM_Unix.pm: close STDERR if $stderr_duped;
573 lib/ExtUtils/MM_Unix.pm: open STDERR, ">&STDERR_COPY" ## no critic
574 lib/Fatal.pm: close FH;
575 lib/File/Compare.pm: open(FROM,"<",$from) or goto fail_open1;
576 lib/File/Compare.pm: binmode FROM;
577 lib/File/Compare.pm: open(TO,"<",$to) or goto fail_open2;
578 lib/File/Compare.pm: binmode TO unless $text_mode;
579 lib/File/Compare.pm: while(defined($fr = read(FROM,$fbuf,$size)) && $fr > 0) {
580 lib/File/Compare.pm: unless (defined($tr = read(TO,$tbuf,$fr)) && $tbuf eq $fbuf) {
581 lib/File/Compare.pm: goto fail_inner if defined($tr = read(TO,$tbuf,$size)) && $tr > 0;
582 lib/File/Compare.pm: close(TO) || goto fail_open2 if $closeto;
583 lib/File/Compare.pm: close(FROM) || goto fail_open1 if $closefrom;
584 lib/File/Compare.pm: close(TO) || goto fail_open2 if $closeto;
585 lib/File/Compare.pm: close(FROM) || goto fail_open1 if $closefrom;
586 lib/File/Compare.pm: close FROM;
587 lib/File/Find.pm: @filenames = readdir DIR;
588 lib/File/Find.pm: @filenames = readdir DIR;
589 lib/HTTP/Tiny.pm: $cb->($chunk, $response) while length( $chunk = $self->read(BUFSIZE, 1) );
590 lib/I18N/LangTags.pm: die unless open(IN, "<in.dat");
591 lib/I18N/LangTags.pm: close(IN);
592 lib/I18N/LangTags.pm: die unless open(IN, "<in.dat");
593 lib/I18N/LangTags.pm: close(IN);
594 lib/inc/latest/private.pm: while (defined(my $e = readdir DH)) {
595 lib/IO/Dir.pm: @_ == 2 or croak 'usage: $dh->open(DIRNAME)';
596 lib/IO/Dir.pm: @_ == 2 or croak 'usage: $dh->seek(POS)';
597 lib/IO/Dir.pm:=item open ( DIRNAME )
598 lib/IO/Dir.pm:=item seek ( POS )
599 lib/IO/File.pm:=item open( FILENAME [,MODE [,PERMS]] )
600 lib/IO/File.pm:=item open( FILENAME, IOLAYERS )
601 lib/IO/File.pm: @_ >= 2 && @_ <= 4 or croak 'usage: $fh->open(FILENAME [,MODE [,PERMS]])';
602 lib/IO/File.pm: croak 'usage: $fh->open(FILENAME, IOLAYERS)';
603 lib/IO/Handle.pm: if ($io->fdopen(fileno(STDIN),"r")) {
604 lib/IO/Handle.pm: if ($io->fdopen(fileno(STDOUT),"w")) {
605 lib/IO/Handle.pm: $io->read ( BUF, LEN, [OFFSET] )
606 lib/IO/Handle.pm: $io->sysread ( BUF, LEN, [OFFSET] )
607 lib/IO/Handle.pm: $io->syswrite ( BUF, [LEN, [OFFSET]] )
608 lib/IO/Handle.pm: $io->truncate ( LEN )
609 lib/IO/Handle.pm:=item $io->write ( BUF, LEN [, OFFSET ] )
610 lib/IO/Handle.pm: @_ == 2 or croak 'usage: $io->truncate(LEN)';
611 lib/IO/Handle.pm: @_ == 3 || @_ == 4 or croak 'usage: $io->read(BUF, LEN [, OFFSET])';
612 lib/IO/Handle.pm: @_ == 3 || @_ == 4 or croak 'usage: $io->sysread(BUF, LEN [, OFFSET])';
613 lib/IO/Handle.pm: @_ >= 2 && @_ <= 4 or croak 'usage: $io->write(BUF [, LEN [, OFFSET]])';
614 lib/IO/Handle.pm: @_ >= 2 && @_ <= 4 or croak 'usage: $io->syswrite(BUF [, LEN [, OFFSET]])';
615 lib/IO/Seekable.pm:=item $io->seek ( POS, WHENCE )
616 lib/IO/Seekable.pm:=item $io->sysseek( POS, WHENCE )
617 lib/IO/Seekable.pm: @_ == 3 or croak 'usage: $io->seek(POS, WHENCE)';
618 lib/IO/Seekable.pm: @_ == 3 or croak 'usage: $io->sysseek(POS, WHENCE)';
619 lib/IO/Socket/INET.pm: $sock->socket(AF_INET, $type, $proto) or
620 lib/IO/Socket/INET.pm: croak 'usage: $sock->bind(NAME) or $sock->bind(PORT, ADDR)';
621 lib/IO/Socket/UNIX.pm: $sock->socket(AF_UNIX, $type, 0) or
622 lib/IO/Socket.pm: @_ == 4 or croak 'usage: $sock->socket(DOMAIN, TYPE, PROTOCOL)';
623 lib/IO/Socket.pm: @_ == 4 || croak 'usage: IO::Socket->socketpair(DOMAIN, TYPE, PROTOCOL)';
624 lib/IO/Socket.pm: @_ == 2 or croak 'usage: $sock->bind(NAME)';
625 lib/IO/Socket.pm: @_ >= 2 && @_ <= 4 or croak 'usage: $sock->send(BUF, [FLAGS, [TO]])';
626 lib/IO/Socket.pm: @_ == 3 || @_ == 4 or croak 'usage: $sock->recv(BUF, LEN [, FLAGS])';
627 lib/IO/Socket.pm: @_ == 2 or croak 'usage: $sock->shutdown(HOW)';
628 lib/IO/Socket.pm:=item socketpair(DOMAIN, TYPE, PROTOCOL)
629 lib/IO/Zlib.pm:=item open ( FILENAME, MODE )
630 lib/IO/Zlib.pm:=item read ( BUF, NBYTES, [OFFSET] )
631 lib/IO/Zlib.pm:=item seek ( OFFSET, WHENCE )
632 lib/IO/Zlib.pm: open(FH, "gzip -dc $filename |") # for read opens
633 lib/IO/Zlib.pm: open(FH, " | gzip > $filename") # for write opens
634 lib/IPC/Cmd.pm: fileno(STDOUT).'>',
635 lib/IPC/Cmd.pm: fileno(STDERR).'>',
636 lib/IPC/Cmd.pm:C<system()> call with your command and then re-open STDERR and STDOUT.
637 lib/IPC/Open2.pm: $pid = open(HANDLE, "|cmd args|");
638 lib/IPC/Open3.pm:C<open(FOO, "-|")> the child process will just be the forked Perl
639 lib/IPC/Open3.pm: if defined fileno STDERR && fileno STDERR != fileno STDOUT;
640 lib/IPC/SharedMem.pm: @_ == 3 or croak '$shm->read(POS, SIZE)';
641 lib/IPC/SharedMem.pm: @_ == 4 or croak '$shm->write(STRING, POS, SIZE)';
642 lib/IPC/SharedMem.pm:=item read ( POS, SIZE )
643 lib/IPC/SharedMem.pm:=item write ( STRING, POS, SIZE )
644 lib/JSON/PP.pm:can be annoying if you write JSON texts manually and want to be able to
645 lib/MIME/Base64.pm: open(FILE, "/var/log/wtmp") or die "$!";
646 lib/MIME/Base64.pm: while (read(FILE, $buf, 60*57)) {
647 lib/Module/Build/Base.pm: while (defined($file = readdir DH)) {
648 lib/Module/Build/Base.pm: ( !$self->_is_interactive && eof STDIN );
649 lib/Module/Build/Base.pm: open FH, '$q{magic_numfile}' or return 0;
650 lib/Module/Build/Base.pm: close FH;
651 lib/Module/Build/Base.pm: or die "Can't write LICENSE file: $!";
652 lib/Module/Build/Base.pm: while (defined (my $file = readdir DH)) {
653 lib/Module/Build/Compat.pm: open MAKE, "> $in{makefile}" or die "Cannot write $in{makefile}: $!";
654 lib/Module/Build/Compat.pm: close MAKE;
655 lib/Module/Build/ConfigData.pm:close DATA;
656 lib/Module/Build/Notes.pm:close DATA;
657 lib/Module/Build/Notes.pm:close DATA;
658 lib/Module/Pluggable/Object.pm: open PKGFILE, "<$pkg_file" or die "search_paths: Can't open $pkg_file: $!";
659 lib/Module/Pluggable/Object.pm: close PKGFILE;
660 lib/Net/Domain.pm: if (open(RES, "/etc/resolv.conf")) {
661 lib/Net/Domain.pm: close(RES);
662 lib/Net/FTP/dataconn.pm: # for some reason if we continously open RETR connections and not
663 lib/Net/FTP.pm:=item read ( BUFFER, SIZE [, TIMEOUT ] )
664 lib/Net/FTP.pm:=item write ( BUFFER, SIZE [, TIMEOUT ] )
665 lib/Net/SMTP.pm:=item send ( ADDRESS )
666 lib/O.pm: open (SAVEOUT, ">&STDOUT");
667 lib/O.pm: close STDOUT;
668 lib/O.pm: open (STDOUT, ">", \$O::BEGIN_output);
669 lib/O.pm: close STDOUT;
670 lib/O.pm: open (STDOUT, ">&SAVEOUT");
671 lib/O.pm: close SAVEOUT;
672 lib/O.pm: close STDERR if $veryquiet;
673 lib/Opcode.pm: close(DATA);
674 lib/open.pm: binmode(STDIN, ":utf8");
675 lib/open.pm: binmode(STDIN, ":$1");
676 lib/open.pm: binmode(STDOUT, ":utf8");
677 lib/open.pm: binmode(STDERR, ":utf8");
678 lib/open.pm: binmode(STDOUT, ":$1");
679 lib/open.pm: binmode(STDERR, ":$1");
680 lib/open.pm: use open IN => ":crlf", OUT => ":bytes";
681 lib/open.pm: use open OUT => ':utf8';
682 lib/open.pm: use open IO => ":encoding(iso-8859-7)";
683 lib/open.pm: use open IO => ':locale';
684 lib/open.pm: use open OUT => ':locale';
685 lib/open.pm: use open IO => ':encoding(utf8)';
686 lib/open.pm: use open IO => ':locale';
687 lib/open.pm: use open IO => ':encoding(iso-8859-7)';
688 lib/Pod/Checker.pm:where to write POD syntax error messages. Either argument may be a scalar
689 lib/Pod/Escapes.pm: open(IN, "<$dir$file") or die "can't read-open $dir$file: $!";
690 lib/Pod/Escapes.pm: close(IN);
691 lib/Pod/Functions.pm:close DATA;
692 lib/Pod/Man.pm:arguments, the first being the input file to read POD from and the second
693 lib/Pod/Perldoc/ToMan.pm: open STDOUT, '>', $self->{_text_ref};
694 lib/Pod/Perldoc/ToMan.pm: close STDOUT;
695 lib/Pod/Perldoc/ToPod.pm: open(IN, "<", $in) or $self->die( "Can't read-open $in: $!\nAborting" );
696 lib/Pod/Perldoc/ToPod.pm: close IN or $self->die( "Can't close $in: $!" );
697 lib/Pod/Perldoc.pm: if ($self->{'podidx'} && open(PODIDX, $self->{'podidx'})) {
698 lib/Pod/Perldoc.pm: close(PODIDX) or $self->die( "Can't close $$self{'podidx'}: $!" );
699 lib/Pod/Perldoc.pm: while (my $file = readdir(DIR)) {
700 lib/Pod/Perldoc.pm: open(PVAR, "<", $perlvar) # "Funk is its own reward"
701 lib/Pod/Perldoc.pm: close PVAR or $self->die( "Can't open $perlvar: $!" );
702 lib/Pod/Perldoc.pm: open( PERLOP, '<', $perlop ) or $self->die( "Can't open $perlop: $!" );
703 lib/Pod/Perldoc.pm: close PERLOP;
704 lib/Pod/Perldoc.pm: open(PFUNC, "<", $perlfunc) # "Funk is its own reward"
705 lib/Pod/Perldoc.pm: close PFUNC or $self->die( "Can't open $perlfunc: $!" );
706 lib/Pod/Perldoc.pm: open(INFAQ, "<", $file) # XXX 5.6ism
707 lib/Pod/Perldoc.pm: close(INFAQ);
708 lib/Pod/Perldoc.pm: while(defined( $cip = readdir(DIR) )) {
709 lib/Pod/Perldoc.pm: open(TEST,"<", $file) or $self->die( "Can't open $file: $!" );
710 lib/Pod/Perldoc.pm: read TEST, $data, $size;
711 lib/Pod/Perldoc.pm: close TEST;
712 lib/Pod/Perldoc.pm: open(TEST,"<", $file) or $self->die( "Can't open $file: $!" ); # XXX 5.6ism
713 lib/Pod/Perldoc.pm: close(TEST) or $self->die( "Can't close $file: $!" );
714 lib/Pod/Perldoc.pm: close(TEST) or $self->die( "Can't close $file: $!" );
715 lib/Pod/Perldoc.pm: open(TMP, "<", $output) or $self->die( "Can't open $output: $!" ); # XXX 5.6ism
716 lib/Pod/Perldoc.pm: close TMP or $self->die( "Can't close while $output: $!" );
717 lib/Pod/Perldoc.pm: eval q~ END { close(STDOUT) || CORE::die "Can't close STDOUT: $!" } ~;
718 lib/Pod/PlainText.pm:arguments, the first being the file handle to read POD from and the second
719 lib/Pod/Simple/PullParser.pm: open(PODSOURCE, "<$_[0]") || Carp::croak "Can't open $_[0]: $!";
720 lib/Pod/Simple/RTF.pm: # We get to escape out 'F' so that we can send RTF files thru the mail
721 lib/Pod/Simple/Search.pm: open PODFILE, "<$file" or die "_path2modname: Can't open $file: $!";
722 lib/Pod/Simple/Search.pm: close PODFILE;
723 lib/Pod/Simple/Search.pm: my @items = sort readdir(INDIR);
724 lib/Pod/Simple/Search.pm: } elsif( !open(INPOD, $file) ) {
725 lib/Pod/Simple/Search.pm: close(INPOD);
726 lib/Pod/Simple/Search.pm: close(INPOD);
727 lib/Pod/Simple/Search.pm: unless( open(MAYBEPOD,"<$file") ) {
728 lib/Pod/Simple/Search.pm: close(MAYBEPOD) || die "Bizarre error closing $file: $!\nAborting";
729 lib/Pod/Simple/Search.pm: close(MAYBEPOD) || die "Bizarre error closing $file: $!\nAborting";
730 lib/Pod/Simple.pm: open(PODSOURCE, "<$source") || Carp::croak("Can't open $source: $!");
731 lib/Pod/Text.pm: unless (open (IN, $fhs[0])) {
732 lib/POSIX.pm: getchar => 'CORE::getc(STDIN)',
733 lib/sigtrap.pm: syswrite(STDERR, 'Caught a SIG', 12);
734 lib/sigtrap.pm: syswrite(STDERR, $_[0], length($_[0]));
735 lib/sigtrap.pm: syswrite(STDERR, ' at ', 4);
736 lib/sigtrap.pm: syswrite(STDERR, $file, length($file));
737 lib/sigtrap.pm: syswrite(STDERR, ' line ', 6);
738 lib/sigtrap.pm: syswrite(STDERR, $line, length($line));
739 lib/sigtrap.pm: syswrite(STDERR, "\n", 1);
740 lib/sigtrap.pm: syswrite(STDERR, $mess, length($mess));
741 lib/Storable.pm: open(FILE, ">>$file") || logcroak "can't write into $file: $!";
742 lib/Storable.pm: flock(FILE, LOCK_EX) ||
743 lib/Storable.pm: truncate FILE, 0;
744 lib/Storable.pm: open(FILE, ">$file") || logcroak "can't create $file: $!";
745 lib/Storable.pm: binmode FILE; # Archaic systems...
746 lib/Storable.pm: if (!(close(FILE) or undef $ret) || $@) {
747 lib/Storable.pm: open(FILE, $file) || logcroak "can't open $file: $!";
748 lib/Storable.pm: binmode FILE; # Archaic systems...
749 lib/Storable.pm: flock(FILE, LOCK_SH) || logcroak "can't get shared lock on $file: $!";
750 lib/Storable.pm: close(FILE);
751 lib/Sys/Syslog.pm: if (open(CONS, ">/dev/console")) {
752 lib/Sys/Syslog.pm: close CONS;
753 lib/Sys/Syslog.pm: return syswrite(SYSLOG, $buf, length($buf));
754 lib/Sys/Syslog.pm: return syswrite(SYSLOG, $buf, length($buf));
755 lib/Sys/Syslog.pm: #return send(SYSLOG, $buf, 0);
756 lib/Sys/Syslog.pm: if (!socket(SYSLOG, AF_INET, SOCK_STREAM, $proto)) {
757 lib/Sys/Syslog.pm: if (!socket(SYSLOG, AF_INET, SOCK_DGRAM, $proto)) {
758 lib/Sys/Syslog.pm: if (!sysopen(SYSLOG, $syslog_path, O_WRONLY, 0400)) {
759 lib/Sys/Syslog.pm: if (not open(SYSLOG, ">$syslog_path")) {
760 lib/Sys/Syslog.pm: if (!socket(SYSLOG, AF_UNIX, SOCK_STREAM, 0)) {
761 lib/Sys/Syslog.pm: if (!socket(SYSLOG, AF_UNIX, SOCK_DGRAM, 0)) {
762 lib/Sys/Syslog.pm: vec($rin, fileno(SYSLOG), 1) = 1;
763 lib/Sys/Syslog.pm: return close SYSLOG;
764 lib/TAP/Parser/Iterator/Process.pm: return if ( fileno($fh) == fileno(STDIN) );
765 lib/TAP/Parser/Iterator/Stream.pm: open( TEST, 'test.tap' );
766 lib/TAP/Parser/Source.pm: if ( open( TEST, $file ) ) {
767 lib/TAP/Parser/Source.pm: close(TEST) or die "Can't close $file. $!\n";
768 lib/Term/Cap.pm: open( TERMCAP, "< $TERMCAP\0" ) || croak "open $TERMCAP: $!";
769 lib/Term/Cap.pm: close TERMCAP;
770 lib/Term/Complete.pm: while (($_ = getc(STDIN)) ne "\r") {
771 lib/Term/ReadLine.pm: $consoleOUT = defined fileno(STDERR) && $^O ne 'MSWin32' ? "&STDERR" : "&STDOUT";
772 lib/Term/ReadLine.pm: open FIN, ( $^O eq 'MSWin32' && $console eq 'CONIN$' ) ? "+<$console" :
773 lib/Term/ReadLine.pm: open FOUT,">$consoleOUT";
774 lib/Test.pm: open(SOURCEFILE, "<$file") || return;
775 lib/Test.pm: close(SOURCEFILE);
776 lib/Test.pm: open(OUT, ">x.dat") || die $!;
777 lib/Test.pm: close OUT;
778 lib/Test.pm: if (open(DIFF, "$diff_cmd |")) {
779 lib/Test.pm: close(DIFF);
780 lib/Tie/File.pm: read FH, my $buf, $e-$s;
781 lib/Tie/File.pm: $o->flock(MODE)
782 lib/utf8.pm:Because it is not possible to reliably tell UTF-8 from native 8 bit
783 cpan/autodie/lib/Fatal.pm: close FH;
784 cpan/CGI/lib/CGI/Carp.pm: open(LOG, ">>/usr/local/cgi-logs/mycgi-log") or
785 cpan/CGI/lib/CGI/Carp.pm:The quick way to do that is to tell CGI::Carp the name of the program
786 cpan/CGI/lib/CGI/Carp.pm:1.27 Replaced tell STDOUT with bytes=tell STDOUT.
787 cpan/CGI/lib/CGI/Carp.pm: open(SAVEERR, ">&STDERR");
788 cpan/CGI/lib/CGI/Carp.pm: open(STDERR, ">&$no") or
789 cpan/CGI/lib/CGI/Carp.pm: my $bytes_written = eval{tell STDOUT};
790 cpan/CGI/lib/CGI.pm:# doesn't accept CRLF -- instead it wants a LR. EBCDIC machines don't
791 cpan/CGI/lib/CGI.pm: open (IN,"test.in") || die;
792 cpan/CGI/lib/CGI.pm: close IN;
793 cpan/CGI/lib/CGI.pm: open (OUT,'>>','test.out') || die;
794 cpan/CGI/lib/CGI.pm: close OUT;
795 cpan/CGI/lib/CGI.pm: open (IN,'<','test.out') || die;
796 cpan/CGI/lib/CGI.pm: while (!eof(IN)) {
797 cpan/CGI/lib/CGI.pm:don't want it to read CGI parameters from the command line or STDIN,
798 cpan/CGI/lib/CGI.pm: open (OUTFILE,'>>','/usr/local/web/users/feedback');
799 cpan/Compress-Raw-Bzip2/t/compress/CompTestUtils.pm: #while (read(STDIN, $data, 16)) {
800 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDIN;
801 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDOUT;
802 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDIN;
803 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDOUT;
804 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
805 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDIN;
806 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDOUT;
807 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
808 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
809 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDIN;
810 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDOUT;
811 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
812 cpan/Compress-Raw-Zlib/t/compress/CompTestUtils.pm: #while (read(STDIN, $data, 16)) {
813 cpan/CPAN/lib/App/Cpan.pm: return unless open FILE, "<$file";
814 cpan/CPAN/lib/App/Cpan.pm: close FILE;
815 cpan/CPAN/lib/CPAN/Distribution.pm: open FH, $system or die "Could not fork '$system': $!";
816 cpan/CPAN/lib/CPAN/Distribution.pm: return undef; # if we die, then we cannot read YAML's own META.yml
817 cpan/CPAN/lib/CPAN/Distribution.pm: open FH, $build_prereqs
818 cpan/CPAN/lib/CPAN/Distribution.pm: $pid = open README, "which $binary|"
819 cpan/CPAN/lib/CPAN/Distribution.pm: close README
820 cpan/CPAN/lib/CPAN/Distribution.pm: $pid = open README, "$html_converter $saved_file |"
821 cpan/CPAN/lib/CPAN/Distribution.pm: close README or
822 cpan/CPAN/lib/CPAN/Distribution.pm: open FH, $tmpin
823 cpan/CPAN/lib/CPAN/Distribution.pm: "Will not send CPAN Testers report with generated Makefile.PL.\n"
824 cpan/CPAN/lib/CPAN/Distroprefs.pm: open FH, "<$abs" or die $result->as_fatal(msg => "$!");
825 cpan/CPAN/lib/CPAN/Distroprefs.pm: close FH;
826 cpan/CPAN/lib/CPAN/FTP.pm: open FH, $aslocal or die;
827 cpan/CPAN/lib/CPAN/Kwalify.pm: open FH, $path or die "Could not open '$path': $!";
828 cpan/CPAN/lib/CPAN/Kwalify.pm: open FH, $path or die "Could not open '$path': $!";
829 cpan/CPAN/lib/CPAN.pm: open(STDOUT,">$m$_") or die "open:$_:$!\n";
830 cpan/CPAN/lib/CPAN.pm: open(STDOUT,$pipe) or die "open:$pipe:$!\n";
831 cpan/CPAN/lib/CPAN.pm: close(STDOUT);
832 cpan/CPAN/lib/CPAN.pm: open(STDOUT,">&SAVEOUT");
833 cpan/CPAN/lib/CPAN.pm: open FH, $local_file or die "Could not open '$local_file': $!";
834 cpan/CPAN/lib/CPAN.pm: open FH, ">$local_file" or die "Could not open '$local_file': $!";
835 cpan/CPAN/lib/CPAN.pm: yaml_module which module to use to read/write YAML files
836 cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm: unless ( open(CFG, $file) ) {
837 cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm: unless ( close(CFG) ) {
838 cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm: open( CFG, '>' . $file ) or return $self->_error(
839 cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm: close CFG;
840 cpan/CPAN-Meta-YAML/t/lib/Test.pm: open( FILE, " $file" ) or die "open($file) failed: $!";
841 cpan/CPAN-Meta-YAML/t/lib/Test.pm: binmode( FILE, $_[0] ) if @_ > 0 && $] > 5.006;
842 cpan/CPAN-Meta-YAML/t/lib/Test.pm: # binmode(FILE); # disable perl's BOM interpretation
843 cpan/CPAN-Meta-YAML/t/lib/Test.pm: close( FILE ) or die "close($file) failed: $!";
844 cpan/CPANPLUS/lib/CPANPLUS/Internals/Report.pm: ### -- if not, send NA grade
845 cpan/CPANPLUS/lib/CPANPLUS/Internals/Report.pm: ### -- send NA grade.
846 cpan/CPANPLUS/lib/CPANPLUS/Module.pm: my @count = readdir(DIR);
847 cpan/CPANPLUS/lib/CPANPLUS/Module.pm: close DIR;
848 cpan/CPANPLUS/lib/CPANPLUS/Shell/Default/Plugins/CustomSource.pm: ' /cs --write PATH # write source index' . $/
849 cpan/DB_File/DB_File.pm: open(FH, ">$arg[1]") or return undef ;
850 cpan/DB_File/DB_File.pm: close FH ;
851 cpan/DB_File/DB_File.pm: open(DB_FH, "+<&=$fd") || die "dup $!";
852 cpan/DB_File/DB_File.pm: flock (DB_FH, LOCK_EX) || die "flock: $!";
853 cpan/DB_File/DB_File.pm: flock(DB_FH, LOCK_UN);
854 cpan/DB_File/DB_File.pm: close(DB_FH);
855 cpan/Devel-PPPort/PPPort.pm: unless (open IN, "<$filename") {
856 cpan/Devel-PPPort/PPPort.pm: close IN;
857 cpan/Devel-PPPort/PPPort.pm: if (open PATCH, ">$opt{patch}") {
858 cpan/Devel-PPPort/PPPort.pm:close PATCH if $patch_opened;
859 cpan/Devel-PPPort/PPPort.pm: open OUT, ">$0" or die "cannot strip $0: $!\n";
860 cpan/Digest-MD5/MD5.pm: open(FILE, $file) or die "Can't open '$file': $!";
861 cpan/Digest-MD5/MD5.pm: binmode(FILE);
862 cpan/Digest-MD5/MD5.pm: close(FILE);
863 cpan/Digest-MD5/MD5.pm: open(FILE, $file) or die "Can't open '$file': $!";
864 cpan/Digest-MD5/MD5.pm: binmode(FILE);
865 cpan/Digest-SHA/lib/Digest/SHA.pm: $file eq '-' and open(FH, '< -')
866 cpan/Digest-SHA/lib/Digest/SHA.pm: or sysopen(FH, $file, O_RDONLY)
867 cpan/Digest-SHA/lib/Digest/SHA.pm: while (($n = read(FH, $buf, 4096))) {
868 cpan/Digest-SHA/lib/Digest/SHA.pm: close(FH);
869 cpan/Digest-SHA/lib/Digest/SHA.pm: binmode(FH) if $binary || $portable;
870 cpan/Digest-SHA/lib/Digest/SHA.pm: close(FH);
871 cpan/Digest-SHA/lib/Digest/SHA.pm: while (($n1 = read(FH, $buf1, 4096))) {
872 cpan/Digest-SHA/lib/Digest/SHA.pm: $n2 = read(FH, $buf2, 4096);
873 cpan/Digest-SHA/lib/Digest/SHA.pm: close(FH);
874 cpan/Encode/Encode.pm: open(INPUT, "< :encoding(shiftjis)", $infile)
875 cpan/Encode/Encode.pm: open(OUTPUT, "> :encoding(euc-jp)", $outfile)
876 cpan/Encode/Encode.pm: close(INPUT) || die "can't close $infile: $!";
877 cpan/Encode/Encode.pm: close(OUTPUT) || die "can't close $outfile: $!";
878 cpan/Encode/Encode.pm: open(INPUT, "< :raw", $infile)
879 cpan/Encode/Encode.pm: open(OUTPUT, "> :raw", $outfile)
880 cpan/Encode/Encode.pm: close(INPUT) || die "can't close $infile: $!";
881 cpan/Encode/Encode.pm: close(OUTPUT) || die "can't close $outfile: $!";
882 cpan/Encode/encoding.pm: binmode( STDIN, ":raw" );
883 cpan/Encode/encoding.pm: binmode( STDOUT, ":raw" );
884 cpan/Encode/encoding.pm: binmode(STDIN);
885 cpan/Encode/encoding.pm: binmode(STDOUT);
886 cpan/Encode/encoding.pm: binmode(STDOUT=>':encoding(utf8)'); # bang!
887 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm: my @out = grep /$rex/, readdir DIR;
888 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm: if ($ENV{PERL_MM_USE_DEFAULT} || (!$isa_tty && eof STDIN)) {
889 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm: if( open(STDERR_COPY, '>&STDERR') ) { ## no critic
890 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm: close STDERR if $stderr_duped;
891 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm: open STDERR, ">&STDERR_COPY" ## no critic
892 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/BFD.pm: open(FILE, ">$file") || die "Can't create $file: $!";
893 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/BFD.pm: close FILE;
894 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/MPV.pm: open(FILE, ">$file") || die "Can't create $file: $!";
895 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/MPV.pm: close FILE;
896 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm:open OUT, ">$file" or die $!;
897 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm:close OUT
898 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm:open OUT, ">$file" or die $!;
899 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm:close OUT
900 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm: open(FILE, ">$file") || die "Can't create $file: $!";
901 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm: close FILE;
902 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Problem.pm: open(FILE, ">$file") || die "Can't create $file: $!";
903 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Problem.pm: close FILE;
904 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Recurs.pm: open(FILE, ">$file") || die "Can't create $file: $!";
905 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Recurs.pm: close FILE;
906 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/SAS.pm: open(FILE, ">$file") || die "Can't create $file: $!";
907 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/SAS.pm: close FILE;
908 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/XS.pm: open(FILE, ">$file") || die "Can't create $file: $!";
909 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/XS.pm: close FILE;
910 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm: open(FILE, ">calibrate_mtime.tmp") || die $!;
911 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm: close FILE;
912 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm: open( MMTMP, '>mmtesttmp.com' ) ||
913 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm: close MMTMP;
914 cpan/HTTP-Tiny/lib/HTTP/Tiny.pm: $cb->($chunk, $response) while length( $chunk = $self->read(BUFSIZE, 1) );
915 cpan/IO-Compress/lib/Compress/Zlib.pm: binmode STDOUT; # gzopen only sets it on the fd
916 cpan/IO-Compress/lib/Compress/Zlib.pm: binmode STDIN;
917 cpan/IO-Compress/lib/Compress/Zlib.pm: binmode STDOUT;
918 cpan/IO-Compress/lib/Compress/Zlib.pm: binmode STDIN;
919 cpan/IO-Compress/lib/Compress/Zlib.pm: binmode STDOUT;
920 cpan/IO-Compress/lib/Compress/Zlib.pm: while (read(STDIN, $input, 4096))
921 cpan/IO-Compress/t/compress/CompTestUtils.pm: #while (read(STDIN, $data, 16)) {
922 cpan/IO-Zlib/Zlib.pm:=item open ( FILENAME, MODE )
923 cpan/IO-Zlib/Zlib.pm:=item read ( BUF, NBYTES, [OFFSET] )
924 cpan/IO-Zlib/Zlib.pm:=item seek ( OFFSET, WHENCE )
925 cpan/IO-Zlib/Zlib.pm: open(FH, "gzip -dc $filename |") # for read opens
926 cpan/IO-Zlib/Zlib.pm: open(FH, " | gzip > $filename") # for write opens
927 cpan/IPC-Cmd/lib/IPC/Cmd.pm: fileno(STDOUT).'>',
928 cpan/IPC-Cmd/lib/IPC/Cmd.pm: fileno(STDERR).'>',
929 cpan/IPC-Cmd/lib/IPC/Cmd.pm:C<system()> call with your command and then re-open STDERR and STDOUT.
930 cpan/IPC-SysV/lib/IPC/SharedMem.pm: @_ == 3 or croak '$shm->read(POS, SIZE)';
931 cpan/IPC-SysV/lib/IPC/SharedMem.pm: @_ == 4 or croak '$shm->write(STRING, POS, SIZE)';
932 cpan/IPC-SysV/lib/IPC/SharedMem.pm:=item read ( POS, SIZE )
933 cpan/IPC-SysV/lib/IPC/SharedMem.pm:=item write ( STRING, POS, SIZE )
934 cpan/JSON-PP/lib/JSON/PP.pm:can be annoying if you write JSON texts manually and want to be able to
935 cpan/libnet/Net/Domain.pm: if (open(RES, "/etc/resolv.conf")) {
936 cpan/libnet/Net/Domain.pm: close(RES);
937 cpan/libnet/Net/FTP/dataconn.pm: # for some reason if we continously open RETR connections and not
938 cpan/libnet/Net/FTP.pm:=item read ( BUFFER, SIZE [, TIMEOUT ] )
939 cpan/libnet/Net/FTP.pm:=item write ( BUFFER, SIZE [, TIMEOUT ] )
940 cpan/libnet/Net/SMTP.pm:=item send ( ADDRESS )
941 cpan/MIME-Base64/Base64.pm: open(FILE, "/var/log/wtmp") or die "$!";
942 cpan/MIME-Base64/Base64.pm: while (read(FILE, $buf, 60*57)) {
943 cpan/Module-Build/lib/inc/latest/private.pm: while (defined(my $e = readdir DH)) {
944 cpan/Module-Build/lib/Module/Build/Base.pm: while (defined($file = readdir DH)) {
945 cpan/Module-Build/lib/Module/Build/Base.pm: ( !$self->_is_interactive && eof STDIN );
946 cpan/Module-Build/lib/Module/Build/Base.pm: open FH, '$q{magic_numfile}' or return 0;
947 cpan/Module-Build/lib/Module/Build/Base.pm: close FH;
948 cpan/Module-Build/lib/Module/Build/Base.pm: or die "Can't write LICENSE file: $!";
949 cpan/Module-Build/lib/Module/Build/Base.pm: while (defined (my $file = readdir DH)) {
950 cpan/Module-Build/lib/Module/Build/Compat.pm: open MAKE, "> $in{makefile}" or die "Cannot write $in{makefile}: $!";
951 cpan/Module-Build/lib/Module/Build/Compat.pm: close MAKE;
952 cpan/Module-Build/lib/Module/Build/ConfigData.pm:close DATA;
953 cpan/Module-Build/lib/Module/Build/Notes.pm:close DATA;
954 cpan/Module-Build/lib/Module/Build/Notes.pm:close DATA;
955 cpan/Module-Build/t/lib/MBTest.pm: open SAVEOUT, ">&" . fileno($handle)
956 cpan/Module-Metadata/t/lib/MBTest.pm: open SAVEOUT, ">&" . fileno($handle)
957 cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm: open PKGFILE, "<$pkg_file" or die "search_paths: Can't open $pkg_file: $!";
958 cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm: close PKGFILE;
959 cpan/Parse-CPAN-Meta/t/lib/Parse/CPAN/Meta/Test.pm: open( FILE, " $file" ) or die "open($file) failed: $!";
960 cpan/Parse-CPAN-Meta/t/lib/Parse/CPAN/Meta/Test.pm: close( FILE ) or die "close($file) failed: $!";
961 cpan/Pod-Escapes/lib/Pod/Escapes.pm: open(IN, "<$dir$file") or die "can't read-open $dir$file: $!";
962 cpan/Pod-Escapes/lib/Pod/Escapes.pm: close(IN);
963 cpan/Pod-Parser/lib/Pod/Checker.pm:where to write POD syntax error messages. Either argument may be a scalar
964 cpan/Pod-Parser/lib/Pod/PlainText.pm:arguments, the first being the file handle to read POD from and the second
965 cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm: open STDOUT, '>', $self->{_text_ref};
966 cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm: close STDOUT;
967 cpan/Pod-Perldoc/lib/Pod/Perldoc/ToPod.pm: open(IN, "<", $in) or $self->die( "Can't read-open $in: $!\nAborting" );
968 cpan/Pod-Perldoc/lib/Pod/Perldoc/ToPod.pm: close IN or $self->die( "Can't close $in: $!" );
969 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: if ($self->{'podidx'} && open(PODIDX, $self->{'podidx'})) {
970 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close(PODIDX) or $self->die( "Can't close $$self{'podidx'}: $!" );
971 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: while (my $file = readdir(DIR)) {
972 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: open(PVAR, "<", $perlvar) # "Funk is its own reward"
973 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close PVAR or $self->die( "Can't open $perlvar: $!" );
974 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: open( PERLOP, '<', $perlop ) or $self->die( "Can't open $perlop: $!" );
975 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close PERLOP;
976 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: open(PFUNC, "<", $perlfunc) # "Funk is its own reward"
977 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close PFUNC or $self->die( "Can't open $perlfunc: $!" );
978 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: open(INFAQ, "<", $file) # XXX 5.6ism
979 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close(INFAQ);
980 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: while(defined( $cip = readdir(DIR) )) {
981 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: open(TEST,"<", $file) or $self->die( "Can't open $file: $!" );
982 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: read TEST, $data, $size;
983 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close TEST;
984 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: open(TEST,"<", $file) or $self->die( "Can't open $file: $!" ); # XXX 5.6ism
985 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close(TEST) or $self->die( "Can't close $file: $!" );
986 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close(TEST) or $self->die( "Can't close $file: $!" );
987 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: open(TMP, "<", $output) or $self->die( "Can't open $output: $!" ); # XXX 5.6ism
988 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close TMP or $self->die( "Can't close while $output: $!" );
989 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: eval q~ END { close(STDOUT) || CORE::die "Can't close STDOUT: $!" } ~;
990 cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm: open(PODSOURCE, "<$_[0]") || Carp::croak "Can't open $_[0]: $!";
991 cpan/Pod-Simple/lib/Pod/Simple/RTF.pm: # We get to escape out 'F' so that we can send RTF files thru the mail
992 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: open PODFILE, "<$file" or die "_path2modname: Can't open $file: $!";
993 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: close PODFILE;
994 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: my @items = sort readdir(INDIR);
995 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: } elsif( !open(INPOD, $file) ) {
996 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: close(INPOD);
997 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: close(INPOD);
998 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: unless( open(MAYBEPOD,"<$file") ) {
999 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: close(MAYBEPOD) || die "Bizarre error closing $file: $!\nAborting";
1000 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: close(MAYBEPOD) || die "Bizarre error closing $file: $!\nAborting";
1001 cpan/Pod-Simple/lib/Pod/Simple.pm: open(PODSOURCE, "<$source") || Carp::croak("Can't open $source: $!");
1002 cpan/podlators/lib/Pod/Man.pm:arguments, the first being the input file to read POD from and the second
1003 cpan/podlators/lib/Pod/Text.pm: unless (open (IN, $fhs[0])) {
1004 cpan/Sys-Syslog/Syslog.pm: if (open(CONS, ">/dev/console")) {
1005 cpan/Sys-Syslog/Syslog.pm: close CONS;
1006 cpan/Sys-Syslog/Syslog.pm: return syswrite(SYSLOG, $buf, length($buf));
1007 cpan/Sys-Syslog/Syslog.pm: return syswrite(SYSLOG, $buf, length($buf));
1008 cpan/Sys-Syslog/Syslog.pm: #return send(SYSLOG, $buf, 0);
1009 cpan/Sys-Syslog/Syslog.pm: if (!socket(SYSLOG, AF_INET, SOCK_STREAM, $proto)) {
1010 cpan/Sys-Syslog/Syslog.pm: if (!socket(SYSLOG, AF_INET, SOCK_DGRAM, $proto)) {
1011 cpan/Sys-Syslog/Syslog.pm: if (!sysopen(SYSLOG, $syslog_path, O_WRONLY, 0400)) {
1012 cpan/Sys-Syslog/Syslog.pm: if (not open(SYSLOG, ">$syslog_path")) {
1013 cpan/Sys-Syslog/Syslog.pm: if (!socket(SYSLOG, AF_UNIX, SOCK_STREAM, 0)) {
1014 cpan/Sys-Syslog/Syslog.pm: if (!socket(SYSLOG, AF_UNIX, SOCK_DGRAM, 0)) {
1015 cpan/Sys-Syslog/Syslog.pm: vec($rin, fileno(SYSLOG), 1) = 1;
1016 cpan/Sys-Syslog/Syslog.pm: return close SYSLOG;
1017 cpan/Term-Cap/Cap.pm: open( TERMCAP, "< $TERMCAP\0" ) || croak "open $TERMCAP: $!";
1018 cpan/Term-Cap/Cap.pm: close TERMCAP;
1019 cpan/Test/lib/Test.pm: open(SOURCEFILE, "<$file") || return;
1020 cpan/Test/lib/Test.pm: close(SOURCEFILE);
1021 cpan/Test/lib/Test.pm: open(OUT, ">x.dat") || die $!;
1022 cpan/Test/lib/Test.pm: close OUT;
1023 cpan/Test/lib/Test.pm: if (open(DIFF, "$diff_cmd |")) {
1024 cpan/Test/lib/Test.pm: close(DIFF);
1025 cpan/Test-Harness/lib/App/Prove/State.pm: open FH, ">$store" or croak "Can't write $store ($!)";
1026 cpan/Test-Harness/lib/App/Prove/State.pm: close FH;
1027 cpan/Test-Harness/lib/App/Prove/State.pm: open FH, "<$name" or croak "Can't read $name ($!)";
1028 cpan/Test-Harness/lib/App/Prove/State.pm: close FH;
1029 cpan/Test-Harness/lib/App/Prove.pm: open RC, "<$rc_file" or croak "Can't read $rc_file ($!)";
1030 cpan/Test-Harness/lib/App/Prove.pm: close RC;
1031 cpan/Test-Harness/lib/TAP/Parser/Iterator/Process.pm: return if ( fileno($fh) == fileno(STDIN) );
1032 cpan/Test-Harness/lib/TAP/Parser/Iterator/Stream.pm: open( TEST, 'test.tap' );
1033 cpan/Test-Harness/lib/TAP/Parser/Source.pm: if ( open( TEST, $file ) ) {
1034 cpan/Test-Harness/lib/TAP/Parser/Source.pm: close(TEST) or die "Can't close $file. $!\n";
1035 cpan/Test-Harness/t/lib/IO/c55Capture.pm: open SAVEOUT, ">&" . fileno($handle)
1036 cpan/Win32API-File/ExtUtils/Myconst2perl.pm: open( STDOUT, ">$outfile" ) or die "Can't create $outfile: $!\n";
1037 cpan/Win32API-File/ExtUtils/Myconst2perl.pm: open( MODULE, "<$file" ) or die "Can't read Perl file, $file: $!\n";
1038 cpan/Win32API-File/ExtUtils/Myconst2perl.pm: close( MODULE );
1039 cpan/Win32API-File/ExtUtils/Myconst2perl.pm: open( XS, "<$file" ) or die "Can't read C file, $file: $!\n";
1040 cpan/Win32API-File/ExtUtils/Myconst2perl.pm: close( XS );
1041 cpan/Win32API-File/File.pm: open( FILE, "<&=".$ivFd ) # "r" w/o "w"
1042 cpan/Win32API-File/File.pm: open( FILE, ">&=".$ivFd ) # "w" w/o "r"
1043 cpan/Win32API-File/File.pm: open( FILE, "+<&=".$ivFd ) # both "r" and "w"
1044 ext/B/B/Concise.pm: # in 5.8+, open(FILEHANDLE,MODE,REFERENCE) writes to string
1045 ext/B/B/Concise.pm:# distracting if you're trying to tell OPs apart. Therefore we'd like to
1046 ext/B/B/Xref.pm: open(STDOUT, ">$arg") or return "$arg: $!\n";
1047 ext/B/O.pm: open (SAVEOUT, ">&STDOUT");
1048 ext/B/O.pm: close STDOUT;
1049 ext/B/O.pm: open (STDOUT, ">", \$O::BEGIN_output);
1050 ext/B/O.pm: close STDOUT;
1051 ext/B/O.pm: open (STDOUT, ">&SAVEOUT");
1052 ext/B/O.pm: close SAVEOUT;
1053 ext/B/O.pm: close STDERR if $veryquiet;
1054 ext/Errno/Errno.pm: unless (open(FH, "/fangorn/spouse")) {
1055 ext/IPC-Open3/lib/IPC/Open2.pm: $pid = open(HANDLE, "|cmd args|");
1056 ext/IPC-Open3/lib/IPC/Open3.pm:C<open(FOO, "-|")> the child process will just be the forked Perl
1057 ext/IPC-Open3/lib/IPC/Open3.pm: if defined fileno STDERR && fileno STDERR != fileno STDOUT;
1058 ext/Opcode/Opcode.pm: close(DATA);
1059 ext/Pod-Functions/Functions.pm:close DATA;
1060 ext/POSIX/lib/POSIX.pm: getchar => 'CORE::getc(STDIN)',
1061 lib/App/Cpan.pm: return unless open FILE, "<$file";
1062 lib/App/Cpan.pm: close FILE;
1063 lib/App/Prove/State.pm: open FH, ">$store" or croak "Can't write $store ($!)";
1064 lib/App/Prove/State.pm: close FH;
1065 lib/App/Prove/State.pm: open FH, "<$name" or croak "Can't read $name ($!)";
1066 lib/App/Prove/State.pm: close FH;
1067 lib/App/Prove.pm: open RC, "<$rc_file" or croak "Can't read $rc_file ($!)";
1068 lib/App/Prove.pm: close RC;
1069 lib/B/Concise.pm: # in 5.8+, open(FILEHANDLE,MODE,REFERENCE) writes to string
1070 lib/B/Concise.pm:# distracting if you're trying to tell OPs apart. Therefore we'd like to
1071 lib/B/Xref.pm: open(STDOUT, ">$arg") or return "$arg: $!\n";
1072 lib/CGI/Carp.pm: open(LOG, ">>/usr/local/cgi-logs/mycgi-log") or
1073 lib/CGI/Carp.pm:The quick way to do that is to tell CGI::Carp the name of the program
1074 lib/CGI/Carp.pm:1.27 Replaced tell STDOUT with bytes=tell STDOUT.
1075 lib/CGI/Carp.pm: open(SAVEERR, ">&STDERR");
1076 lib/CGI/Carp.pm: open(STDERR, ">&$no") or
1077 lib/CGI/Carp.pm: my $bytes_written = eval{tell STDOUT};
1078 lib/CGI.pm:# doesn't accept CRLF -- instead it wants a LR. EBCDIC machines don't
1079 lib/CGI.pm: open (IN,"test.in") || die;
1080 lib/CGI.pm: close IN;
1081 lib/CGI.pm: open (OUT,'>>','test.out') || die;
1082 lib/CGI.pm: close OUT;
1083 lib/CGI.pm: open (IN,'<','test.out') || die;
1084 lib/CGI.pm: while (!eof(IN)) {
1085 lib/CGI.pm:don't want it to read CGI parameters from the command line or STDIN,
1086 lib/CGI.pm: open (OUTFILE,'>>','/usr/local/web/users/feedback');
1087 lib/Compress/Raw/Zlib.pm: binmode STDIN;
1088 lib/Compress/Raw/Zlib.pm: binmode STDOUT;
1089 lib/Compress/Raw/Zlib.pm: binmode STDIN;
1090 lib/Compress/Raw/Zlib.pm: binmode STDOUT;
1091 lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
1092 lib/Compress/Raw/Zlib.pm: binmode STDIN;
1093 lib/Compress/Raw/Zlib.pm: binmode STDOUT;
1094 lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
1095 lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
1096 lib/Compress/Raw/Zlib.pm: binmode STDIN;
1097 lib/Compress/Raw/Zlib.pm: binmode STDOUT;
1098 lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
1099 lib/Compress/Zlib.pm: binmode STDOUT; # gzopen only sets it on the fd
1100 lib/Compress/Zlib.pm: binmode STDIN;
1101 lib/Compress/Zlib.pm: binmode STDOUT;
1102 lib/Compress/Zlib.pm: binmode STDIN;
1103 lib/Compress/Zlib.pm: binmode STDOUT;
1104 lib/Compress/Zlib.pm: while (read(STDIN, $input, 4096))
1105 lib/CPAN/Distribution.pm: open FH, $system or die "Could not fork '$system': $!";
1106 lib/CPAN/Distribution.pm: return undef; # if we die, then we cannot read YAML's own META.yml
1107 lib/CPAN/Distribution.pm: open FH, $build_prereqs
1108 lib/CPAN/Distribution.pm: $pid = open README, "which $binary|"
1109 lib/CPAN/Distribution.pm: close README
1110 lib/CPAN/Distribution.pm: $pid = open README, "$html_converter $saved_file |"
1111 lib/CPAN/Distribution.pm: close README or
1112 lib/CPAN/Distribution.pm: open FH, $tmpin
1113 lib/CPAN/Distribution.pm: "Will not send CPAN Testers report with generated Makefile.PL.\n"
1114 lib/CPAN/Distroprefs.pm: open FH, "<$abs" or die $result->as_fatal(msg => "$!");
1115 lib/CPAN/Distroprefs.pm: close FH;
1116 lib/CPAN/FTP.pm: open FH, $aslocal or die;
1117 lib/CPAN/Kwalify.pm: open FH, $path or die "Could not open '$path': $!";
1118 lib/CPAN/Kwalify.pm: open FH, $path or die "Could not open '$path': $!";
1119 lib/CPAN/Meta/YAML.pm: unless ( open(CFG, $file) ) {
1120 lib/CPAN/Meta/YAML.pm: unless ( close(CFG) ) {
1121 lib/CPAN/Meta/YAML.pm: open( CFG, '>' . $file ) or return $self->_error(
1122 lib/CPAN/Meta/YAML.pm: close CFG;
1123 lib/CPAN.pm: open(STDOUT,">$m$_") or die "open:$_:$!\n";
1124 lib/CPAN.pm: open(STDOUT,$pipe) or die "open:$pipe:$!\n";
1125 lib/CPAN.pm: close(STDOUT);
1126 lib/CPAN.pm: open(STDOUT,">&SAVEOUT");
1127 lib/CPAN.pm: open FH, $local_file or die "Could not open '$local_file': $!";
1128 lib/CPAN.pm: open FH, ">$local_file" or die "Could not open '$local_file': $!";
1129 lib/CPAN.pm: yaml_module which module to use to read/write YAML files
1130 lib/CPANPLUS/Internals/Report.pm: ### -- if not, send NA grade
1131 lib/CPANPLUS/Internals/Report.pm: ### -- send NA grade.
1132 lib/CPANPLUS/Module.pm: my @count = readdir(DIR);
1133 lib/CPANPLUS/Module.pm: close DIR;
1134 lib/CPANPLUS/Shell/Default/Plugins/CustomSource.pm: ' /cs --write PATH # write source index' . $/
1135 lib/Cwd.pm: $direntry = readdir(DIR);
1136 lib/Cwd.pm: unless (defined ($dir = readdir(PARENT)))
1137 lib/Cwd.pm: defined( open(REALPATH, '-|') || exec '/usr/bin/fullpath', '-t', $path ) or
1138 lib/Cwd.pm: close REALPATH;
1139 lib/DB_File.pm: open(FH, ">$arg[1]") or return undef ;
1140 lib/DB_File.pm: close FH ;
1141 lib/DB_File.pm: open(DB_FH, "+<&=$fd") || die "dup $!";
1142 lib/DB_File.pm: flock (DB_FH, LOCK_EX) || die "flock: $!";
1143 lib/DB_File.pm: flock(DB_FH, LOCK_UN);
1144 lib/DB_File.pm: close(DB_FH);
1145 lib/Devel/PPPort.pm: unless (open IN, "<$filename") {
1146 lib/Devel/PPPort.pm: close IN;
1147 lib/Devel/PPPort.pm: if (open PATCH, ">$opt{patch}") {
1148 lib/Devel/PPPort.pm:close PATCH if $patch_opened;
1149 lib/Devel/PPPort.pm: open OUT, ">$0" or die "cannot strip $0: $!\n";
1150 lib/diagnostics.pm: if (open(POD_DIAG, $PODFILE)) {
1151 lib/diagnostics.pm: if (open(POD_DIAG, $file)) {
1152 lib/diagnostics.pm:if (eof(POD_DIAG)) {
1153 lib/diagnostics.pm: close POD_DIAG unless *main::DATA eq *POD_DIAG;
1154 lib/Digest/MD5.pm: open(FILE, $file) or die "Can't open '$file': $!";
1155 lib/Digest/MD5.pm: binmode(FILE);
1156 lib/Digest/MD5.pm: close(FILE);
1157 lib/Digest/MD5.pm: open(FILE, $file) or die "Can't open '$file': $!";
1158 lib/Digest/MD5.pm: binmode(FILE);
1159 lib/Digest/SHA.pm: $file eq '-' and open(FH, '< -')
1160 lib/Digest/SHA.pm: or sysopen(FH, $file, O_RDONLY)
1161 lib/Digest/SHA.pm: while (($n = read(FH, $buf, 4096))) {
1162 lib/Digest/SHA.pm: close(FH);
1163 lib/Digest/SHA.pm: binmode(FH) if $binary || $portable;
1164 lib/Digest/SHA.pm: close(FH);
1165 lib/Digest/SHA.pm: while (($n1 = read(FH, $buf1, 4096))) {
1166 lib/Digest/SHA.pm: $n2 = read(FH, $buf2, 4096);
1167 lib/Digest/SHA.pm: close(FH);
1168 lib/DirHandle.pm: @_ == 2 or croak 'usage: $dh->open(DIRNAME)';
1169 lib/Encode.pm: open(INPUT, "< :encoding(shiftjis)", $infile)
1170 lib/Encode.pm: open(OUTPUT, "> :encoding(euc-jp)", $outfile)
1171 lib/Encode.pm: close(INPUT) || die "can't close $infile: $!";
1172 lib/Encode.pm: close(OUTPUT) || die "can't close $outfile: $!";
1173 lib/Encode.pm: open(INPUT, "< :raw", $infile)
1174 lib/Encode.pm: open(OUTPUT, "> :raw", $outfile)
1175 lib/Encode.pm: close(INPUT) || die "can't close $infile: $!";
1176 lib/Encode.pm: close(OUTPUT) || die "can't close $outfile: $!";
1177 lib/encoding.pm: binmode( STDIN, ":raw" );
1178 lib/encoding.pm: binmode( STDOUT, ":raw" );
1179 lib/encoding.pm: binmode(STDIN);
1180 lib/encoding.pm: binmode(STDOUT);
1181 lib/encoding.pm: binmode(STDOUT=>':encoding(utf8)'); # bang!
1182 lib/Errno.pm: unless (open(FH, "/fangorn/spouse")) {
1183 lib/ExtUtils/Command.pm: open(FILE,">>$file") || die "Cannot write $file:$!";
1184 lib/ExtUtils/Command.pm: close(FILE);
1185 lib/ExtUtils/Command.pm: open ORIG, $_ or do { warn "dos2unix can't open $_: $!"; return };
1186 lib/ExtUtils/Command.pm: open TEMP, ">$temp" or
1187 lib/ExtUtils/Command.pm: close ORIG;
1188 lib/ExtUtils/Command.pm: close TEMP;
1189 lib/ExtUtils/Embed.pm: if(open(FH, $extra)) {
1190 lib/ExtUtils/Install.pm: open(CMD, "|$cmd >$dest") || die "Cannot fork: $!";
1191 lib/ExtUtils/Install.pm: open(SRC, $src) || die "Cannot open $src: $!";
1192 lib/ExtUtils/Install.pm: while (my $len = sysread(SRC, $buf, $sz)) {
1193 lib/ExtUtils/Install.pm: syswrite(CMD, $buf, $len);
1194 lib/ExtUtils/Install.pm: close SRC;
1195 lib/ExtUtils/Install.pm: close CMD or die "Filter command '$cmd' failed for $src";
1196 lib/ExtUtils/Installed.pm: if (open PACKFH, $file) {
1197 lib/ExtUtils/Installed.pm: close PACKFH;
1198 lib/ExtUtils/Liblist.pm: my @out = grep /$rex/, readdir DIR;
1199 lib/ExtUtils/MakeMaker.pm: if ($ENV{PERL_MM_USE_DEFAULT} || (!$isa_tty && eof STDIN)) {
1200 lib/ExtUtils/Manifest.pm: open(MANIFEST, ">>$MANIFEST") or
1201 lib/ExtUtils/Manifest.pm: close MANIFEST or die "Error closing $MANIFEST: $!";
1202 lib/ExtUtils/Manifest.pm: open MANIFEST, $MANIFEST or die "Could not open $MANIFEST: $!";
1203 lib/ExtUtils/Manifest.pm: close MANIFEST;
1204 lib/ExtUtils/Manifest.pm: open MANIFEST, ">", $MANIFEST or die "(must_rewrite=$must_rewrite) Could not open >$MANIFEST: $!";
1205 lib/ExtUtils/Manifest.pm: close MANIFEST or die "could not write $MANIFEST: $!";
1206 lib/ExtUtils/MM_Unix.pm: if( open(STDERR_COPY, '>&STDERR') ) { ## no critic
1207 lib/ExtUtils/MM_Unix.pm: close STDERR if $stderr_duped;
1208 lib/ExtUtils/MM_Unix.pm: open STDERR, ">&STDERR_COPY" ## no critic
1209 lib/Fatal.pm: close FH;
1210 lib/File/Compare.pm: open(FROM,"<",$from) or goto fail_open1;
1211 lib/File/Compare.pm: binmode FROM;
1212 lib/File/Compare.pm: open(TO,"<",$to) or goto fail_open2;
1213 lib/File/Compare.pm: binmode TO unless $text_mode;
1214 lib/File/Compare.pm: while(defined($fr = read(FROM,$fbuf,$size)) && $fr > 0) {
1215 lib/File/Compare.pm: unless (defined($tr = read(TO,$tbuf,$fr)) && $tbuf eq $fbuf) {
1216 lib/File/Compare.pm: goto fail_inner if defined($tr = read(TO,$tbuf,$size)) && $tr > 0;
1217 lib/File/Compare.pm: close(TO) || goto fail_open2 if $closeto;
1218 lib/File/Compare.pm: close(FROM) || goto fail_open1 if $closefrom;
1219 lib/File/Compare.pm: close(TO) || goto fail_open2 if $closeto;
1220 lib/File/Compare.pm: close(FROM) || goto fail_open1 if $closefrom;
1221 lib/File/Compare.pm: close FROM;
1222 lib/File/Find.pm: @filenames = readdir DIR;
1223 lib/File/Find.pm: @filenames = readdir DIR;
1224 lib/HTTP/Tiny.pm: $cb->($chunk, $response) while length( $chunk = $self->read(BUFSIZE, 1) );
1225 lib/I18N/LangTags.pm: die unless open(IN, "<in.dat");
1226 lib/I18N/LangTags.pm: close(IN);
1227 lib/I18N/LangTags.pm: die unless open(IN, "<in.dat");
1228 lib/I18N/LangTags.pm: close(IN);
1229 lib/inc/latest/private.pm: while (defined(my $e = readdir DH)) {
1230 lib/IO/Dir.pm: @_ == 2 or croak 'usage: $dh->open(DIRNAME)';
1231 lib/IO/Dir.pm: @_ == 2 or croak 'usage: $dh->seek(POS)';
1232 lib/IO/Dir.pm:=item open ( DIRNAME )
1233 lib/IO/Dir.pm:=item seek ( POS )
1234 lib/IO/File.pm:=item open( FILENAME [,MODE [,PERMS]] )
1235 lib/IO/File.pm:=item open( FILENAME, IOLAYERS )
1236 lib/IO/File.pm: @_ >= 2 && @_ <= 4 or croak 'usage: $fh->open(FILENAME [,MODE [,PERMS]])';
1237 lib/IO/File.pm: croak 'usage: $fh->open(FILENAME, IOLAYERS)';
1238 lib/IO/Handle.pm: if ($io->fdopen(fileno(STDIN),"r")) {
1239 lib/IO/Handle.pm: if ($io->fdopen(fileno(STDOUT),"w")) {
1240 lib/IO/Handle.pm: $io->read ( BUF, LEN, [OFFSET] )
1241 lib/IO/Handle.pm: $io->sysread ( BUF, LEN, [OFFSET] )
1242 lib/IO/Handle.pm: $io->syswrite ( BUF, [LEN, [OFFSET]] )
1243 lib/IO/Handle.pm: $io->truncate ( LEN )
1244 lib/IO/Handle.pm:=item $io->write ( BUF, LEN [, OFFSET ] )
1245 lib/IO/Handle.pm: @_ == 2 or croak 'usage: $io->truncate(LEN)';
1246 lib/IO/Handle.pm: @_ == 3 || @_ == 4 or croak 'usage: $io->read(BUF, LEN [, OFFSET])';
1247 lib/IO/Handle.pm: @_ == 3 || @_ == 4 or croak 'usage: $io->sysread(BUF, LEN [, OFFSET])';
1248 lib/IO/Handle.pm: @_ >= 2 && @_ <= 4 or croak 'usage: $io->write(BUF [, LEN [, OFFSET]])';
1249 lib/IO/Handle.pm: @_ >= 2 && @_ <= 4 or croak 'usage: $io->syswrite(BUF [, LEN [, OFFSET]])';
1250 lib/IO/Seekable.pm:=item $io->seek ( POS, WHENCE )
1251 lib/IO/Seekable.pm:=item $io->sysseek( POS, WHENCE )
1252 lib/IO/Seekable.pm: @_ == 3 or croak 'usage: $io->seek(POS, WHENCE)';
1253 lib/IO/Seekable.pm: @_ == 3 or croak 'usage: $io->sysseek(POS, WHENCE)';
1254 lib/IO/Socket/INET.pm: $sock->socket(AF_INET, $type, $proto) or
1255 lib/IO/Socket/INET.pm: croak 'usage: $sock->bind(NAME) or $sock->bind(PORT, ADDR)';
1256 lib/IO/Socket/UNIX.pm: $sock->socket(AF_UNIX, $type, 0) or
1257 lib/IO/Socket.pm: @_ == 4 or croak 'usage: $sock->socket(DOMAIN, TYPE, PROTOCOL)';
1258 lib/IO/Socket.pm: @_ == 4 || croak 'usage: IO::Socket->socketpair(DOMAIN, TYPE, PROTOCOL)';
1259 lib/IO/Socket.pm: @_ == 2 or croak 'usage: $sock->bind(NAME)';
1260 lib/IO/Socket.pm: @_ >= 2 && @_ <= 4 or croak 'usage: $sock->send(BUF, [FLAGS, [TO]])';
1261 lib/IO/Socket.pm: @_ == 3 || @_ == 4 or croak 'usage: $sock->recv(BUF, LEN [, FLAGS])';
1262 lib/IO/Socket.pm: @_ == 2 or croak 'usage: $sock->shutdown(HOW)';
1263 lib/IO/Socket.pm:=item socketpair(DOMAIN, TYPE, PROTOCOL)
1264 lib/IO/Zlib.pm:=item open ( FILENAME, MODE )
1265 lib/IO/Zlib.pm:=item read ( BUF, NBYTES, [OFFSET] )
1266 lib/IO/Zlib.pm:=item seek ( OFFSET, WHENCE )
1267 lib/IO/Zlib.pm: open(FH, "gzip -dc $filename |") # for read opens
1268 lib/IO/Zlib.pm: open(FH, " | gzip > $filename") # for write opens
1269 lib/IPC/Cmd.pm: fileno(STDOUT).'>',
1270 lib/IPC/Cmd.pm: fileno(STDERR).'>',
1271 lib/IPC/Cmd.pm:C<system()> call with your command and then re-open STDERR and STDOUT.
1272 lib/IPC/Open2.pm: $pid = open(HANDLE, "|cmd args|");
1273 lib/IPC/Open3.pm:C<open(FOO, "-|")> the child process will just be the forked Perl
1274 lib/IPC/Open3.pm: if defined fileno STDERR && fileno STDERR != fileno STDOUT;
1275 lib/IPC/SharedMem.pm: @_ == 3 or croak '$shm->read(POS, SIZE)';
1276 lib/IPC/SharedMem.pm: @_ == 4 or croak '$shm->write(STRING, POS, SIZE)';
1277 lib/IPC/SharedMem.pm:=item read ( POS, SIZE )
1278 lib/IPC/SharedMem.pm:=item write ( STRING, POS, SIZE )
1279 lib/JSON/PP.pm:can be annoying if you write JSON texts manually and want to be able to
1280 lib/MIME/Base64.pm: open(FILE, "/var/log/wtmp") or die "$!";
1281 lib/MIME/Base64.pm: while (read(FILE, $buf, 60*57)) {
1282 lib/Module/Build/Base.pm: while (defined($file = readdir DH)) {
1283 lib/Module/Build/Base.pm: ( !$self->_is_interactive && eof STDIN );
1284 lib/Module/Build/Base.pm: open FH, '$q{magic_numfile}' or return 0;
1285 lib/Module/Build/Base.pm: close FH;
1286 lib/Module/Build/Base.pm: or die "Can't write LICENSE file: $!";
1287 lib/Module/Build/Base.pm: while (defined (my $file = readdir DH)) {
1288 lib/Module/Build/Compat.pm: open MAKE, "> $in{makefile}" or die "Cannot write $in{makefile}: $!";
1289 lib/Module/Build/Compat.pm: close MAKE;
1290 lib/Module/Build/ConfigData.pm:close DATA;
1291 lib/Module/Build/Notes.pm:close DATA;
1292 lib/Module/Build/Notes.pm:close DATA;
1293 lib/Module/Pluggable/Object.pm: open PKGFILE, "<$pkg_file" or die "search_paths: Can't open $pkg_file: $!";
1294 lib/Module/Pluggable/Object.pm: close PKGFILE;
1295 lib/Net/Domain.pm: if (open(RES, "/etc/resolv.conf")) {
1296 lib/Net/Domain.pm: close(RES);
1297 lib/Net/FTP/dataconn.pm: # for some reason if we continously open RETR connections and not
1298 lib/Net/FTP.pm:=item read ( BUFFER, SIZE [, TIMEOUT ] )
1299 lib/Net/FTP.pm:=item write ( BUFFER, SIZE [, TIMEOUT ] )
1300 lib/Net/SMTP.pm:=item send ( ADDRESS )
1301 lib/O.pm: open (SAVEOUT, ">&STDOUT");
1302 lib/O.pm: close STDOUT;
1303 lib/O.pm: open (STDOUT, ">", \$O::BEGIN_output);
1304 lib/O.pm: close STDOUT;
1305 lib/O.pm: open (STDOUT, ">&SAVEOUT");
1306 lib/O.pm: close SAVEOUT;
1307 lib/O.pm: close STDERR if $veryquiet;
1308 lib/Opcode.pm: close(DATA);
1309 lib/open.pm: binmode(STDIN, ":utf8");
1310 lib/open.pm: binmode(STDIN, ":$1");
1311 lib/open.pm: binmode(STDOUT, ":utf8");
1312 lib/open.pm: binmode(STDERR, ":utf8");
1313 lib/open.pm: binmode(STDOUT, ":$1");
1314 lib/open.pm: binmode(STDERR, ":$1");
1315 lib/open.pm: use open IN => ":crlf", OUT => ":bytes";
1316 lib/open.pm: use open OUT => ':utf8';
1317 lib/open.pm: use open IO => ":encoding(iso-8859-7)";
1318 lib/open.pm: use open IO => ':locale';
1319 lib/open.pm: use open OUT => ':locale';
1320 lib/open.pm: use open IO => ':encoding(utf8)';
1321 lib/open.pm: use open IO => ':locale';
1322 lib/open.pm: use open IO => ':encoding(iso-8859-7)';
1323 lib/Pod/Checker.pm:where to write POD syntax error messages. Either argument may be a scalar
1324 lib/Pod/Escapes.pm: open(IN, "<$dir$file") or die "can't read-open $dir$file: $!";
1325 lib/Pod/Escapes.pm: close(IN);
1326 lib/Pod/Functions.pm:close DATA;
1327 lib/Pod/Man.pm:arguments, the first being the input file to read POD from and the second
1328 lib/Pod/Perldoc/ToMan.pm: open STDOUT, '>', $self->{_text_ref};
1329 lib/Pod/Perldoc/ToMan.pm: close STDOUT;
1330 lib/Pod/Perldoc/ToPod.pm: open(IN, "<", $in) or $self->die( "Can't read-open $in: $!\nAborting" );
1331 lib/Pod/Perldoc/ToPod.pm: close IN or $self->die( "Can't close $in: $!" );
1332 lib/Pod/Perldoc.pm: if ($self->{'podidx'} && open(PODIDX, $self->{'podidx'})) {
1333 lib/Pod/Perldoc.pm: close(PODIDX) or $self->die( "Can't close $$self{'podidx'}: $!" );
1334 lib/Pod/Perldoc.pm: while (my $file = readdir(DIR)) {
1335 lib/Pod/Perldoc.pm: open(PVAR, "<", $perlvar) # "Funk is its own reward"
1336 lib/Pod/Perldoc.pm: close PVAR or $self->die( "Can't open $perlvar: $!" );
1337 lib/Pod/Perldoc.pm: open( PERLOP, '<', $perlop ) or $self->die( "Can't open $perlop: $!" );
1338 lib/Pod/Perldoc.pm: close PERLOP;
1339 lib/Pod/Perldoc.pm: open(PFUNC, "<", $perlfunc) # "Funk is its own reward"
1340 lib/Pod/Perldoc.pm: close PFUNC or $self->die( "Can't open $perlfunc: $!" );
1341 lib/Pod/Perldoc.pm: open(INFAQ, "<", $file) # XXX 5.6ism
1342 lib/Pod/Perldoc.pm: close(INFAQ);
1343 lib/Pod/Perldoc.pm: while(defined( $cip = readdir(DIR) )) {
1344 lib/Pod/Perldoc.pm: open(TEST,"<", $file) or $self->die( "Can't open $file: $!" );
1345 lib/Pod/Perldoc.pm: read TEST, $data, $size;
1346 lib/Pod/Perldoc.pm: close TEST;
1347 lib/Pod/Perldoc.pm: open(TEST,"<", $file) or $self->die( "Can't open $file: $!" ); # XXX 5.6ism
1348 lib/Pod/Perldoc.pm: close(TEST) or $self->die( "Can't close $file: $!" );
1349 lib/Pod/Perldoc.pm: close(TEST) or $self->die( "Can't close $file: $!" );
1350 lib/Pod/Perldoc.pm: open(TMP, "<", $output) or $self->die( "Can't open $output: $!" ); # XXX 5.6ism
1351 lib/Pod/Perldoc.pm: close TMP or $self->die( "Can't close while $output: $!" );
1352 lib/Pod/Perldoc.pm: eval q~ END { close(STDOUT) || CORE::die "Can't close STDOUT: $!" } ~;
1353 lib/Pod/PlainText.pm:arguments, the first being the file handle to read POD from and the second
1354 lib/Pod/Simple/PullParser.pm: open(PODSOURCE, "<$_[0]") || Carp::croak "Can't open $_[0]: $!";
1355 lib/Pod/Simple/RTF.pm: # We get to escape out 'F' so that we can send RTF files thru the mail
1356 lib/Pod/Simple/Search.pm: open PODFILE, "<$file" or die "_path2modname: Can't open $file: $!";
1357 lib/Pod/Simple/Search.pm: close PODFILE;
1358 lib/Pod/Simple/Search.pm: my @items = sort readdir(INDIR);
1359 lib/Pod/Simple/Search.pm: } elsif( !open(INPOD, $file) ) {
1360 lib/Pod/Simple/Search.pm: close(INPOD);
1361 lib/Pod/Simple/Search.pm: close(INPOD);
1362 lib/Pod/Simple/Search.pm: unless( open(MAYBEPOD,"<$file") ) {
1363 lib/Pod/Simple/Search.pm: close(MAYBEPOD) || die "Bizarre error closing $file: $!\nAborting";
1364 lib/Pod/Simple/Search.pm: close(MAYBEPOD) || die "Bizarre error closing $file: $!\nAborting";
1365 lib/Pod/Simple.pm: open(PODSOURCE, "<$source") || Carp::croak("Can't open $source: $!");
1366 lib/Pod/Text.pm: unless (open (IN, $fhs[0])) {
1367 lib/POSIX.pm: getchar => 'CORE::getc(STDIN)',
1368 lib/sigtrap.pm: syswrite(STDERR, 'Caught a SIG', 12);
1369 lib/sigtrap.pm: syswrite(STDERR, $_[0], length($_[0]));
1370 lib/sigtrap.pm: syswrite(STDERR, ' at ', 4);
1371 lib/sigtrap.pm: syswrite(STDERR, $file, length($file));
1372 lib/sigtrap.pm: syswrite(STDERR, ' line ', 6);
1373 lib/sigtrap.pm: syswrite(STDERR, $line, length($line));
1374 lib/sigtrap.pm: syswrite(STDERR, "\n", 1);
1375 lib/sigtrap.pm: syswrite(STDERR, $mess, length($mess));
1376 lib/Storable.pm: open(FILE, ">>$file") || logcroak "can't write into $file: $!";
1377 lib/Storable.pm: flock(FILE, LOCK_EX) ||
1378 lib/Storable.pm: truncate FILE, 0;
1379 lib/Storable.pm: open(FILE, ">$file") || logcroak "can't create $file: $!";
1380 lib/Storable.pm: binmode FILE; # Archaic systems...
1381 lib/Storable.pm: if (!(close(FILE) or undef $ret) || $@) {
1382 lib/Storable.pm: open(FILE, $file) || logcroak "can't open $file: $!";
1383 lib/Storable.pm: binmode FILE; # Archaic systems...
1384 lib/Storable.pm: flock(FILE, LOCK_SH) || logcroak "can't get shared lock on $file: $!";
1385 lib/Storable.pm: close(FILE);
1386 lib/Sys/Syslog.pm: if (open(CONS, ">/dev/console")) {
1387 lib/Sys/Syslog.pm: close CONS;
1388 lib/Sys/Syslog.pm: return syswrite(SYSLOG, $buf, length($buf));
1389 lib/Sys/Syslog.pm: return syswrite(SYSLOG, $buf, length($buf));
1390 lib/Sys/Syslog.pm: #return send(SYSLOG, $buf, 0);
1391 lib/Sys/Syslog.pm: if (!socket(SYSLOG, AF_INET, SOCK_STREAM, $proto)) {
1392 lib/Sys/Syslog.pm: if (!socket(SYSLOG, AF_INET, SOCK_DGRAM, $proto)) {
1393 lib/Sys/Syslog.pm: if (!sysopen(SYSLOG, $syslog_path, O_WRONLY, 0400)) {
1394 lib/Sys/Syslog.pm: if (not open(SYSLOG, ">$syslog_path")) {
1395 lib/Sys/Syslog.pm: if (!socket(SYSLOG, AF_UNIX, SOCK_STREAM, 0)) {
1396 lib/Sys/Syslog.pm: if (!socket(SYSLOG, AF_UNIX, SOCK_DGRAM, 0)) {
1397 lib/Sys/Syslog.pm: vec($rin, fileno(SYSLOG), 1) = 1;
1398 lib/Sys/Syslog.pm: return close SYSLOG;
1399 lib/TAP/Parser/Iterator/Process.pm: return if ( fileno($fh) == fileno(STDIN) );
1400 lib/TAP/Parser/Iterator/Stream.pm: open( TEST, 'test.tap' );
1401 lib/TAP/Parser/Source.pm: if ( open( TEST, $file ) ) {
1402 lib/TAP/Parser/Source.pm: close(TEST) or die "Can't close $file. $!\n";
1403 lib/Term/Cap.pm: open( TERMCAP, "< $TERMCAP\0" ) || croak "open $TERMCAP: $!";
1404 lib/Term/Cap.pm: close TERMCAP;
1405 lib/Term/Complete.pm: while (($_ = getc(STDIN)) ne "\r") {
1406 lib/Term/ReadLine.pm: $consoleOUT = defined fileno(STDERR) && $^O ne 'MSWin32' ? "&STDERR" : "&STDOUT";
1407 lib/Term/ReadLine.pm: open FIN, ( $^O eq 'MSWin32' && $console eq 'CONIN$' ) ? "+<$console" :
1408 lib/Term/ReadLine.pm: open FOUT,">$consoleOUT";
1409 lib/Test.pm: open(SOURCEFILE, "<$file") || return;
1410 lib/Test.pm: close(SOURCEFILE);
1411 lib/Test.pm: open(OUT, ">x.dat") || die $!;
1412 lib/Test.pm: close OUT;
1413 lib/Test.pm: if (open(DIFF, "$diff_cmd |")) {
1414 lib/Test.pm: close(DIFF);
1415 lib/Tie/File.pm: read FH, my $buf, $e-$s;
1416 lib/Tie/File.pm: $o->flock(MODE)
1417 lib/utf8.pm:Because it is not possible to reliably tell UTF-8 from native 8 bit
1418 cpan/autodie/lib/Fatal.pm: close FH;
1419 cpan/CGI/lib/CGI/Carp.pm: open(LOG, ">>/usr/local/cgi-logs/mycgi-log") or
1420 cpan/CGI/lib/CGI/Carp.pm:The quick way to do that is to tell CGI::Carp the name of the program
1421 cpan/CGI/lib/CGI/Carp.pm:1.27 Replaced tell STDOUT with bytes=tell STDOUT.
1422 cpan/CGI/lib/CGI/Carp.pm: open(SAVEERR, ">&STDERR");
1423 cpan/CGI/lib/CGI/Carp.pm: open(STDERR, ">&$no") or
1424 cpan/CGI/lib/CGI/Carp.pm: my $bytes_written = eval{tell STDOUT};
1425 cpan/CGI/lib/CGI.pm:# doesn't accept CRLF -- instead it wants a LR. EBCDIC machines don't
1426 cpan/CGI/lib/CGI.pm: open (IN,"test.in") || die;
1427 cpan/CGI/lib/CGI.pm: close IN;
1428 cpan/CGI/lib/CGI.pm: open (OUT,'>>','test.out') || die;
1429 cpan/CGI/lib/CGI.pm: close OUT;
1430 cpan/CGI/lib/CGI.pm: open (IN,'<','test.out') || die;
1431 cpan/CGI/lib/CGI.pm: while (!eof(IN)) {
1432 cpan/CGI/lib/CGI.pm:don't want it to read CGI parameters from the command line or STDIN,
1433 cpan/CGI/lib/CGI.pm: open (OUTFILE,'>>','/usr/local/web/users/feedback');
1434 cpan/Compress-Raw-Bzip2/t/compress/CompTestUtils.pm: #while (read(STDIN, $data, 16)) {
1435 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDIN;
1436 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDOUT;
1437 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDIN;
1438 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDOUT;
1439 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
1440 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDIN;
1441 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDOUT;
1442 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
1443 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
1444 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDIN;
1445 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: binmode STDOUT;
1446 cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm: while (read(STDIN, $input, 4096))
1447 cpan/Compress-Raw-Zlib/t/compress/CompTestUtils.pm: #while (read(STDIN, $data, 16)) {
1448 cpan/CPAN/lib/App/Cpan.pm: return unless open FILE, "<$file";
1449 cpan/CPAN/lib/App/Cpan.pm: close FILE;
1450 cpan/CPAN/lib/CPAN/Distribution.pm: open FH, $system or die "Could not fork '$system': $!";
1451 cpan/CPAN/lib/CPAN/Distribution.pm: return undef; # if we die, then we cannot read YAML's own META.yml
1452 cpan/CPAN/lib/CPAN/Distribution.pm: open FH, $build_prereqs
1453 cpan/CPAN/lib/CPAN/Distribution.pm: $pid = open README, "which $binary|"
1454 cpan/CPAN/lib/CPAN/Distribution.pm: close README
1455 cpan/CPAN/lib/CPAN/Distribution.pm: $pid = open README, "$html_converter $saved_file |"
1456 cpan/CPAN/lib/CPAN/Distribution.pm: close README or
1457 cpan/CPAN/lib/CPAN/Distribution.pm: open FH, $tmpin
1458 cpan/CPAN/lib/CPAN/Distribution.pm: "Will not send CPAN Testers report with generated Makefile.PL.\n"
1459 cpan/CPAN/lib/CPAN/Distroprefs.pm: open FH, "<$abs" or die $result->as_fatal(msg => "$!");
1460 cpan/CPAN/lib/CPAN/Distroprefs.pm: close FH;
1461 cpan/CPAN/lib/CPAN/FTP.pm: open FH, $aslocal or die;
1462 cpan/CPAN/lib/CPAN/Kwalify.pm: open FH, $path or die "Could not open '$path': $!";
1463 cpan/CPAN/lib/CPAN/Kwalify.pm: open FH, $path or die "Could not open '$path': $!";
1464 cpan/CPAN/lib/CPAN.pm: open(STDOUT,">$m$_") or die "open:$_:$!\n";
1465 cpan/CPAN/lib/CPAN.pm: open(STDOUT,$pipe) or die "open:$pipe:$!\n";
1466 cpan/CPAN/lib/CPAN.pm: close(STDOUT);
1467 cpan/CPAN/lib/CPAN.pm: open(STDOUT,">&SAVEOUT");
1468 cpan/CPAN/lib/CPAN.pm: open FH, $local_file or die "Could not open '$local_file': $!";
1469 cpan/CPAN/lib/CPAN.pm: open FH, ">$local_file" or die "Could not open '$local_file': $!";
1470 cpan/CPAN/lib/CPAN.pm: yaml_module which module to use to read/write YAML files
1471 cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm: unless ( open(CFG, $file) ) {
1472 cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm: unless ( close(CFG) ) {
1473 cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm: open( CFG, '>' . $file ) or return $self->_error(
1474 cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm: close CFG;
1475 cpan/CPAN-Meta-YAML/t/lib/Test.pm: open( FILE, " $file" ) or die "open($file) failed: $!";
1476 cpan/CPAN-Meta-YAML/t/lib/Test.pm: binmode( FILE, $_[0] ) if @_ > 0 && $] > 5.006;
1477 cpan/CPAN-Meta-YAML/t/lib/Test.pm: # binmode(FILE); # disable perl's BOM interpretation
1478 cpan/CPAN-Meta-YAML/t/lib/Test.pm: close( FILE ) or die "close($file) failed: $!";
1479 cpan/CPANPLUS/lib/CPANPLUS/Internals/Report.pm: ### -- if not, send NA grade
1480 cpan/CPANPLUS/lib/CPANPLUS/Internals/Report.pm: ### -- send NA grade.
1481 cpan/CPANPLUS/lib/CPANPLUS/Module.pm: my @count = readdir(DIR);
1482 cpan/CPANPLUS/lib/CPANPLUS/Module.pm: close DIR;
1483 cpan/CPANPLUS/lib/CPANPLUS/Shell/Default/Plugins/CustomSource.pm: ' /cs --write PATH # write source index' . $/
1484 cpan/DB_File/DB_File.pm: open(FH, ">$arg[1]") or return undef ;
1485 cpan/DB_File/DB_File.pm: close FH ;
1486 cpan/DB_File/DB_File.pm: open(DB_FH, "+<&=$fd") || die "dup $!";
1487 cpan/DB_File/DB_File.pm: flock (DB_FH, LOCK_EX) || die "flock: $!";
1488 cpan/DB_File/DB_File.pm: flock(DB_FH, LOCK_UN);
1489 cpan/DB_File/DB_File.pm: close(DB_FH);
1490 cpan/Devel-PPPort/PPPort.pm: unless (open IN, "<$filename") {
1491 cpan/Devel-PPPort/PPPort.pm: close IN;
1492 cpan/Devel-PPPort/PPPort.pm: if (open PATCH, ">$opt{patch}") {
1493 cpan/Devel-PPPort/PPPort.pm:close PATCH if $patch_opened;
1494 cpan/Devel-PPPort/PPPort.pm: open OUT, ">$0" or die "cannot strip $0: $!\n";
1495 cpan/Digest-MD5/MD5.pm: open(FILE, $file) or die "Can't open '$file': $!";
1496 cpan/Digest-MD5/MD5.pm: binmode(FILE);
1497 cpan/Digest-MD5/MD5.pm: close(FILE);
1498 cpan/Digest-MD5/MD5.pm: open(FILE, $file) or die "Can't open '$file': $!";
1499 cpan/Digest-MD5/MD5.pm: binmode(FILE);
1500 cpan/Digest-SHA/lib/Digest/SHA.pm: $file eq '-' and open(FH, '< -')
1501 cpan/Digest-SHA/lib/Digest/SHA.pm: or sysopen(FH, $file, O_RDONLY)
1502 cpan/Digest-SHA/lib/Digest/SHA.pm: while (($n = read(FH, $buf, 4096))) {
1503 cpan/Digest-SHA/lib/Digest/SHA.pm: close(FH);
1504 cpan/Digest-SHA/lib/Digest/SHA.pm: binmode(FH) if $binary || $portable;
1505 cpan/Digest-SHA/lib/Digest/SHA.pm: close(FH);
1506 cpan/Digest-SHA/lib/Digest/SHA.pm: while (($n1 = read(FH, $buf1, 4096))) {
1507 cpan/Digest-SHA/lib/Digest/SHA.pm: $n2 = read(FH, $buf2, 4096);
1508 cpan/Digest-SHA/lib/Digest/SHA.pm: close(FH);
1509 cpan/Encode/Encode.pm: open(INPUT, "< :encoding(shiftjis)", $infile)
1510 cpan/Encode/Encode.pm: open(OUTPUT, "> :encoding(euc-jp)", $outfile)
1511 cpan/Encode/Encode.pm: close(INPUT) || die "can't close $infile: $!";
1512 cpan/Encode/Encode.pm: close(OUTPUT) || die "can't close $outfile: $!";
1513 cpan/Encode/Encode.pm: open(INPUT, "< :raw", $infile)
1514 cpan/Encode/Encode.pm: open(OUTPUT, "> :raw", $outfile)
1515 cpan/Encode/Encode.pm: close(INPUT) || die "can't close $infile: $!";
1516 cpan/Encode/Encode.pm: close(OUTPUT) || die "can't close $outfile: $!";
1517 cpan/Encode/encoding.pm: binmode( STDIN, ":raw" );
1518 cpan/Encode/encoding.pm: binmode( STDOUT, ":raw" );
1519 cpan/Encode/encoding.pm: binmode(STDIN);
1520 cpan/Encode/encoding.pm: binmode(STDOUT);
1521 cpan/Encode/encoding.pm: binmode(STDOUT=>':encoding(utf8)'); # bang!
1522 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm: my @out = grep /$rex/, readdir DIR;
1523 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm: if ($ENV{PERL_MM_USE_DEFAULT} || (!$isa_tty && eof STDIN)) {
1524 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm: if( open(STDERR_COPY, '>&STDERR') ) { ## no critic
1525 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm: close STDERR if $stderr_duped;
1526 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm: open STDERR, ">&STDERR_COPY" ## no critic
1527 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/BFD.pm: open(FILE, ">$file") || die "Can't create $file: $!";
1528 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/BFD.pm: close FILE;
1529 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/MPV.pm: open(FILE, ">$file") || die "Can't create $file: $!";
1530 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/MPV.pm: close FILE;
1531 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm:open OUT, ">$file" or die $!;
1532 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm:close OUT
1533 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm:open OUT, ">$file" or die $!;
1534 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm:close OUT
1535 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm: open(FILE, ">$file") || die "Can't create $file: $!";
1536 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm: close FILE;
1537 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Problem.pm: open(FILE, ">$file") || die "Can't create $file: $!";
1538 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Problem.pm: close FILE;
1539 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Recurs.pm: open(FILE, ">$file") || die "Can't create $file: $!";
1540 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Recurs.pm: close FILE;
1541 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/SAS.pm: open(FILE, ">$file") || die "Can't create $file: $!";
1542 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/SAS.pm: close FILE;
1543 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/XS.pm: open(FILE, ">$file") || die "Can't create $file: $!";
1544 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/XS.pm: close FILE;
1545 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm: open(FILE, ">calibrate_mtime.tmp") || die $!;
1546 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm: close FILE;
1547 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm: open( MMTMP, '>mmtesttmp.com' ) ||
1548 cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm: close MMTMP;
1549 cpan/HTTP-Tiny/lib/HTTP/Tiny.pm: $cb->($chunk, $response) while length( $chunk = $self->read(BUFSIZE, 1) );
1550 cpan/IO-Compress/lib/Compress/Zlib.pm: binmode STDOUT; # gzopen only sets it on the fd
1551 cpan/IO-Compress/lib/Compress/Zlib.pm: binmode STDIN;
1552 cpan/IO-Compress/lib/Compress/Zlib.pm: binmode STDOUT;
1553 cpan/IO-Compress/lib/Compress/Zlib.pm: binmode STDIN;
1554 cpan/IO-Compress/lib/Compress/Zlib.pm: binmode STDOUT;
1555 cpan/IO-Compress/lib/Compress/Zlib.pm: while (read(STDIN, $input, 4096))
1556 cpan/IO-Compress/t/compress/CompTestUtils.pm: #while (read(STDIN, $data, 16)) {
1557 cpan/IO-Zlib/Zlib.pm:=item open ( FILENAME, MODE )
1558 cpan/IO-Zlib/Zlib.pm:=item read ( BUF, NBYTES, [OFFSET] )
1559 cpan/IO-Zlib/Zlib.pm:=item seek ( OFFSET, WHENCE )
1560 cpan/IO-Zlib/Zlib.pm: open(FH, "gzip -dc $filename |") # for read opens
1561 cpan/IO-Zlib/Zlib.pm: open(FH, " | gzip > $filename") # for write opens
1562 cpan/IPC-Cmd/lib/IPC/Cmd.pm: fileno(STDOUT).'>',
1563 cpan/IPC-Cmd/lib/IPC/Cmd.pm: fileno(STDERR).'>',
1564 cpan/IPC-Cmd/lib/IPC/Cmd.pm:C<system()> call with your command and then re-open STDERR and STDOUT.
1565 cpan/IPC-SysV/lib/IPC/SharedMem.pm: @_ == 3 or croak '$shm->read(POS, SIZE)';
1566 cpan/IPC-SysV/lib/IPC/SharedMem.pm: @_ == 4 or croak '$shm->write(STRING, POS, SIZE)';
1567 cpan/IPC-SysV/lib/IPC/SharedMem.pm:=item read ( POS, SIZE )
1568 cpan/IPC-SysV/lib/IPC/SharedMem.pm:=item write ( STRING, POS, SIZE )
1569 cpan/JSON-PP/lib/JSON/PP.pm:can be annoying if you write JSON texts manually and want to be able to
1570 cpan/libnet/Net/Domain.pm: if (open(RES, "/etc/resolv.conf")) {
1571 cpan/libnet/Net/Domain.pm: close(RES);
1572 cpan/libnet/Net/FTP/dataconn.pm: # for some reason if we continously open RETR connections and not
1573 cpan/libnet/Net/FTP.pm:=item read ( BUFFER, SIZE [, TIMEOUT ] )
1574 cpan/libnet/Net/FTP.pm:=item write ( BUFFER, SIZE [, TIMEOUT ] )
1575 cpan/libnet/Net/SMTP.pm:=item send ( ADDRESS )
1576 cpan/MIME-Base64/Base64.pm: open(FILE, "/var/log/wtmp") or die "$!";
1577 cpan/MIME-Base64/Base64.pm: while (read(FILE, $buf, 60*57)) {
1578 cpan/Module-Build/lib/inc/latest/private.pm: while (defined(my $e = readdir DH)) {
1579 cpan/Module-Build/lib/Module/Build/Base.pm: while (defined($file = readdir DH)) {
1580 cpan/Module-Build/lib/Module/Build/Base.pm: ( !$self->_is_interactive && eof STDIN );
1581 cpan/Module-Build/lib/Module/Build/Base.pm: open FH, '$q{magic_numfile}' or return 0;
1582 cpan/Module-Build/lib/Module/Build/Base.pm: close FH;
1583 cpan/Module-Build/lib/Module/Build/Base.pm: or die "Can't write LICENSE file: $!";
1584 cpan/Module-Build/lib/Module/Build/Base.pm: while (defined (my $file = readdir DH)) {
1585 cpan/Module-Build/lib/Module/Build/Compat.pm: open MAKE, "> $in{makefile}" or die "Cannot write $in{makefile}: $!";
1586 cpan/Module-Build/lib/Module/Build/Compat.pm: close MAKE;
1587 cpan/Module-Build/lib/Module/Build/ConfigData.pm:close DATA;
1588 cpan/Module-Build/lib/Module/Build/Notes.pm:close DATA;
1589 cpan/Module-Build/lib/Module/Build/Notes.pm:close DATA;
1590 cpan/Module-Build/t/lib/MBTest.pm: open SAVEOUT, ">&" . fileno($handle)
1591 cpan/Module-Metadata/t/lib/MBTest.pm: open SAVEOUT, ">&" . fileno($handle)
1592 cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm: open PKGFILE, "<$pkg_file" or die "search_paths: Can't open $pkg_file: $!";
1593 cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm: close PKGFILE;
1594 cpan/Parse-CPAN-Meta/t/lib/Parse/CPAN/Meta/Test.pm: open( FILE, " $file" ) or die "open($file) failed: $!";
1595 cpan/Parse-CPAN-Meta/t/lib/Parse/CPAN/Meta/Test.pm: close( FILE ) or die "close($file) failed: $!";
1596 cpan/Pod-Escapes/lib/Pod/Escapes.pm: open(IN, "<$dir$file") or die "can't read-open $dir$file: $!";
1597 cpan/Pod-Escapes/lib/Pod/Escapes.pm: close(IN);
1598 cpan/Pod-Parser/lib/Pod/Checker.pm:where to write POD syntax error messages. Either argument may be a scalar
1599 cpan/Pod-Parser/lib/Pod/PlainText.pm:arguments, the first being the file handle to read POD from and the second
1600 cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm: open STDOUT, '>', $self->{_text_ref};
1601 cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm: close STDOUT;
1602 cpan/Pod-Perldoc/lib/Pod/Perldoc/ToPod.pm: open(IN, "<", $in) or $self->die( "Can't read-open $in: $!\nAborting" );
1603 cpan/Pod-Perldoc/lib/Pod/Perldoc/ToPod.pm: close IN or $self->die( "Can't close $in: $!" );
1604 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: if ($self->{'podidx'} && open(PODIDX, $self->{'podidx'})) {
1605 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close(PODIDX) or $self->die( "Can't close $$self{'podidx'}: $!" );
1606 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: while (my $file = readdir(DIR)) {
1607 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: open(PVAR, "<", $perlvar) # "Funk is its own reward"
1608 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close PVAR or $self->die( "Can't open $perlvar: $!" );
1609 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: open( PERLOP, '<', $perlop ) or $self->die( "Can't open $perlop: $!" );
1610 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close PERLOP;
1611 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: open(PFUNC, "<", $perlfunc) # "Funk is its own reward"
1612 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close PFUNC or $self->die( "Can't open $perlfunc: $!" );
1613 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: open(INFAQ, "<", $file) # XXX 5.6ism
1614 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close(INFAQ);
1615 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: while(defined( $cip = readdir(DIR) )) {
1616 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: open(TEST,"<", $file) or $self->die( "Can't open $file: $!" );
1617 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: read TEST, $data, $size;
1618 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close TEST;
1619 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: open(TEST,"<", $file) or $self->die( "Can't open $file: $!" ); # XXX 5.6ism
1620 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close(TEST) or $self->die( "Can't close $file: $!" );
1621 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close(TEST) or $self->die( "Can't close $file: $!" );
1622 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: open(TMP, "<", $output) or $self->die( "Can't open $output: $!" ); # XXX 5.6ism
1623 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: close TMP or $self->die( "Can't close while $output: $!" );
1624 cpan/Pod-Perldoc/lib/Pod/Perldoc.pm: eval q~ END { close(STDOUT) || CORE::die "Can't close STDOUT: $!" } ~;
1625 cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm: open(PODSOURCE, "<$_[0]") || Carp::croak "Can't open $_[0]: $!";
1626 cpan/Pod-Simple/lib/Pod/Simple/RTF.pm: # We get to escape out 'F' so that we can send RTF files thru the mail
1627 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: open PODFILE, "<$file" or die "_path2modname: Can't open $file: $!";
1628 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: close PODFILE;
1629 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: my @items = sort readdir(INDIR);
1630 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: } elsif( !open(INPOD, $file) ) {
1631 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: close(INPOD);
1632 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: close(INPOD);
1633 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: unless( open(MAYBEPOD,"<$file") ) {
1634 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: close(MAYBEPOD) || die "Bizarre error closing $file: $!\nAborting";
1635 cpan/Pod-Simple/lib/Pod/Simple/Search.pm: close(MAYBEPOD) || die "Bizarre error closing $file: $!\nAborting";
1636 cpan/Pod-Simple/lib/Pod/Simple.pm: open(PODSOURCE, "<$source") || Carp::croak("Can't open $source: $!");
1637 cpan/podlators/lib/Pod/Man.pm:arguments, the first being the input file to read POD from and the second
1638 cpan/podlators/lib/Pod/Text.pm: unless (open (IN, $fhs[0])) {
1639 cpan/Sys-Syslog/Syslog.pm: if (open(CONS, ">/dev/console")) {
1640 cpan/Sys-Syslog/Syslog.pm: close CONS;
1641 cpan/Sys-Syslog/Syslog.pm: return syswrite(SYSLOG, $buf, length($buf));
1642 cpan/Sys-Syslog/Syslog.pm: return syswrite(SYSLOG, $buf, length($buf));
1643 cpan/Sys-Syslog/Syslog.pm: #return send(SYSLOG, $buf, 0);
1644 cpan/Sys-Syslog/Syslog.pm: if (!socket(SYSLOG, AF_INET, SOCK_STREAM, $proto)) {
1645 cpan/Sys-Syslog/Syslog.pm: if (!socket(SYSLOG, AF_INET, SOCK_DGRAM, $proto)) {
1646 cpan/Sys-Syslog/Syslog.pm: if (!sysopen(SYSLOG, $syslog_path, O_WRONLY, 0400)) {
1647 cpan/Sys-Syslog/Syslog.pm: if (not open(SYSLOG, ">$syslog_path")) {
1648 cpan/Sys-Syslog/Syslog.pm: if (!socket(SYSLOG, AF_UNIX, SOCK_STREAM, 0)) {
1649 cpan/Sys-Syslog/Syslog.pm: if (!socket(SYSLOG, AF_UNIX, SOCK_DGRAM, 0)) {
1650 cpan/Sys-Syslog/Syslog.pm: vec($rin, fileno(SYSLOG), 1) = 1;
1651 cpan/Sys-Syslog/Syslog.pm: return close SYSLOG;
1652 cpan/Term-Cap/Cap.pm: open( TERMCAP, "< $TERMCAP\0" ) || croak "open $TERMCAP: $!";
1653 cpan/Term-Cap/Cap.pm: close TERMCAP;
1654 cpan/Test/lib/Test.pm: open(SOURCEFILE, "<$file") || return;
1655 cpan/Test/lib/Test.pm: close(SOURCEFILE);
1656 cpan/Test/lib/Test.pm: open(OUT, ">x.dat") || die $!;
1657 cpan/Test/lib/Test.pm: close OUT;
1658 cpan/Test/lib/Test.pm: if (open(DIFF, "$diff_cmd |")) {
1659 cpan/Test/lib/Test.pm: close(DIFF);
1660 cpan/Test-Harness/lib/App/Prove/State.pm: open FH, ">$store" or croak "Can't write $store ($!)";
1661 cpan/Test-Harness/lib/App/Prove/State.pm: close FH;
1662 cpan/Test-Harness/lib/App/Prove/State.pm: open FH, "<$name" or croak "Can't read $name ($!)";
1663 cpan/Test-Harness/lib/App/Prove/State.pm: close FH;
1664 cpan/Test-Harness/lib/App/Prove.pm: open RC, "<$rc_file" or croak "Can't read $rc_file ($!)";
1665 cpan/Test-Harness/lib/App/Prove.pm: close RC;
1666 cpan/Test-Harness/lib/TAP/Parser/Iterator/Process.pm: return if ( fileno($fh) == fileno(STDIN) );
1667 cpan/Test-Harness/lib/TAP/Parser/Iterator/Stream.pm: open( TEST, 'test.tap' );
1668 cpan/Test-Harness/lib/TAP/Parser/Source.pm: if ( open( TEST, $file ) ) {
1669 cpan/Test-Harness/lib/TAP/Parser/Source.pm: close(TEST) or die "Can't close $file. $!\n";
1670 cpan/Test-Harness/t/lib/IO/c55Capture.pm: open SAVEOUT, ">&" . fileno($handle)
1671 cpan/Win32API-File/ExtUtils/Myconst2perl.pm: open( STDOUT, ">$outfile" ) or die "Can't create $outfile: $!\n";
1672 cpan/Win32API-File/ExtUtils/Myconst2perl.pm: open( MODULE, "<$file" ) or die "Can't read Perl file, $file: $!\n";
1673 cpan/Win32API-File/ExtUtils/Myconst2perl.pm: close( MODULE );
1674 cpan/Win32API-File/ExtUtils/Myconst2perl.pm: open( XS, "<$file" ) or die "Can't read C file, $file: $!\n";
1675 cpan/Win32API-File/ExtUtils/Myconst2perl.pm: close( XS );
1676 cpan/Win32API-File/File.pm: open( FILE, "<&=".$ivFd ) # "r" w/o "w"
1677 cpan/Win32API-File/File.pm: open( FILE, ">&=".$ivFd ) # "w" w/o "r"
1678 cpan/Win32API-File/File.pm: open( FILE, "+<&=".$ivFd ) # both "r" and "w"

Once you're finished "fixing" everything I've cited above, I now
see that it looks like I've forgotten the tests. Please don't
forget to fix all the tests, too. They're very important.

All missplaced moral imperialism aside, do you begin to see why
all this is supremely stupid? It is *NOT*POSSIBLE* from a purely
practical perspective. At the end of the day, it cannot.

So not only should it not be done, it for all practical purposes
*cannot* be done. And that's the bottom line.

Go ahead: argue the first and implement the second.

Or else stop complaining.

Which of those two options will it be?

--tom

FOOTNOTE: The scolding community, you mean. Bah!


doy at tozt

Jul 4, 2012, 1:03 PM

Post #9 of 12 (71 views)
Permalink
Re: [perl #94860] [PATCH] [DOCS] Modernize perlopentut.pod [In reply to]

On Wed, Jul 04, 2012 at 01:24:25PM -0600, Tom Christiansen wrote:
> =============
> Short story
> =============
>
> EITHER:
> #1 Show the courage to formally propose that all these myriad
> things you morally disapprove of be RIPPED OUT of Perl once
> and for all.
> OR ELSE:
> #2 Have the integrity to stop scolding people for the perfectly
> legal acts they enjoy in their own bedroom.
>
> ==============
> Medium story
> ==============
>
> I am sick and tired of the scolding culture that has grown up
> around here. It is stupid, and it is harmful. Make it stop.
>
> The entire PerlCritic disaster has virtually ruined Perl culture,
> replacing it with a bunch of busybodied holier-than-thou types.
>
> And for what? For NOTHING, that's for what.
>
> It is not a fun place to be. It is not in the spirit of Perl to
> police people's private lives, or their past lives. I hate it.
>
> Please stop with all the judgementalism, *especially* all this
> scolding judgementalism that comes unaccompanied by actual
> proposals and offers to rip out of Perl whatsoever you hold in
> moral contempt. It does more harm than good.
>
> --tom
>
> ============
> Long story
> ============
> <snip>

Nobody at all is proposing removing these things from the language. The
only proposal here is changing what new programmers see in the basic
tutorial. Avoiding globals when possible is generally considered to be
good practice in any language, I don't think that's something that's
really going to change at this point.

Now, as for this rant, this sort of thing is at least as
counterproductive as anything the people you're ranting against are
doing. This drives away new programmers, makes p5p a much more
unwelcoming place to be, and generally reflects badly on the Perl
community. These sorts of threads were one of the main reasons that I
avoided participating in p5p for as long as I did, and I know I'm not
the only one.

Perl (pretty desperately) needs to attract new developers to working on
the core, and every time something like this comes up, it's just one
more reason for new people to stay away. Can we please try to stay a bit
more civil?

-doy


perl.p5p at rjbs

Jul 4, 2012, 1:51 PM

Post #10 of 12 (72 views)
Permalink
Re: [perl #94860] [PATCH] [DOCS] Modernize perlopentut.pod [In reply to]

* Tom Christiansen <tchrist [at] perl> [2012-07-04T15:24:25]
> I am sick and tired of the scolding culture that has grown up
> around here. It is stupid, and it is harmful. Make it stop.

I cannot even begin to express how this paragraph, followed by the rest of the
email, makes me feel. It isn't good.

As far as I know, nobody wants to make these things stop working. Nobody wants
to delete all reference them. Nobody wants to make them issue warnings.

The entire question is whether they should be the first thing a user gets to
when reading the "open" tutorial, and the default for showing off the rest of
"open" in that document.

I don't think anybody here is judging anybody else's private life or expressing
moral contempt. Instead, they're saying, "People are going to learn Perl from
the tutorial documents. Someday I'm going to need to hire more Perl people.
What kind of Perl would I like them to have grown up writing?"

> I'll be damned if I'm going to rewrite 43,000 lines of perfectly
> functioning Perl code just to appease a meddling bunch of busibodies'
> nose-cleaning ethic.

Nobody is saying anybody needs to rewrite a single thing, except maybe the
order and style of presentation of contents in one tutorial.

> I'm tired of listening to Pharisees on street corners ranting and raving
> about the splinter in others' eyes. Some of us have actual work to do, and
> the scold-culture's posturing just gets in the way of that.

Listen to yourself, here, Tom. Then listen to yourself again:

> I am sick and tired of the scolding culture that has grown up
> around here. It is stupid, and it is harmful. Make it stop.

I'm done with perl5-porters for today. I'll be back tomorrow.

--
rjbs
Attachments: signature.asc (0.48 KB)


fawaka at gmail

Jul 4, 2012, 1:55 PM

Post #11 of 12 (72 views)
Permalink
Re: [perl #94860] [PATCH] [DOCS] Modernize perlopentut.pod [In reply to]

On Wed, Jul 4, 2012 at 10:24 PM, Tom Christiansen <tchrist [at] perl> wrote:
> =============
> Short story
> =============
>
> EITHER:
> #1 Show the courage to formally propose that all these myriad
> things you morally disapprove of be RIPPED OUT of Perl once
> and for all.
> OR ELSE:
> #2 Have the integrity to stop scolding people for the perfectly
> legal acts they enjoy in their own bedroom.
>
> ==============
> Medium story
> ==============
>
> I am sick and tired of the scolding culture that has grown up
> around here. It is stupid, and it is harmful. Make it stop.
>
> The entire PerlCritic disaster has virtually ruined Perl culture,
> replacing it with a bunch of busybodied holier-than-thou types.
>
> And for what? For NOTHING, that's for what.
>
> It is not a fun place to be. It is not in the spirit of Perl to
> police people's private lives, or their past lives. I hate it.
>
> Please stop with all the judgementalism, *especially* all this
> scolding judgementalism that comes unaccompanied by actual
> proposals and offers to rip out of Perl whatsoever you hold in
> moral contempt. It does more harm than good.
>
> --tom

Tom,

No one is judging you or anyone else for using 2-arg open. No one
scolded you for using package globals as filehandles. I see you're
feeling under attack but I think you're fighting a monster that
doesn't exist.

I can imagine it hurts when people want to rewrite a piece of
documentation that you wrote and are proud of, but taking it
personally doesn't help your cause. By reacting this antagonistically,
you're actively isolating yourself.

A competent perl programmer needs to understand both, I am fairly
certain we all agree on that, the only real discussion here is how

The main point of what most people are trying to say here is that we
should introduce these concepts in a different order than we do now.
It's much easier to explain how 3-arg open works than 2-arg open,
because there's less hidden surprises. Indirect filehandles don't have
the scoping issue that direct filehandles have.

We on p5p all understand such subtle issues, and know when we don't
have to worry about that, but do we really want to bother a newbie
who's just learning perl with that when they're just trying to open a
file?

Leon


tchrist at perl

Jul 5, 2012, 5:10 AM

Post #12 of 12 (71 views)
Permalink
Re: [perl #94860] [PATCH] [DOCS] Modernize perlopentut.pod [In reply to]

Leon wrote:

> The main point of what most people are trying to say here is that we
> should introduce these concepts in a different order than we do now.
> It's much easier to explain how 3-arg open works than 2-arg open,
> because there's less hidden surprises. Indirect filehandles don't have
> the scoping issue that direct filehandles have.

Fine. I withdraw all objection.

Don't forget to talk about encodings if you're going to do
the full three-arg open thing.

--tom

Perl porters RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.