summaryrefslogtreecommitdiff
path: root/pod/perlfaq5.pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod/perlfaq5.pod')
-rw-r--r--pod/perlfaq5.pod31
1 files changed, 17 insertions, 14 deletions
diff --git a/pod/perlfaq5.pod b/pod/perlfaq5.pod
index 41c46a3dae..98e706afad 100644
--- a/pod/perlfaq5.pod
+++ b/pod/perlfaq5.pod
@@ -1,6 +1,6 @@
=head1 NAME
-perlfaq5 - Files and Formats ($Revision: 1.22 $, $Date: 1997/04/24 22:44:02 $)
+perlfaq5 - Files and Formats ($Revision: 1.24 $, $Date: 1998/07/05 15:07:20 $)
=head1 DESCRIPTION
@@ -288,6 +288,10 @@ pair to make it easy to sort the hash in insertion order.
print "$name $. $line";
}
+For passing filehandles to functions, the easiest way is to
+prefer them with a star, as in func(*STDIN). See L<perlfaq7/"Passing
+Filehandles"> for details.
+
If you want to create many, anonymous handles, you should check out the
Symbol, FileHandle, or IO::Handle (etc.) modules. Here's the equivalent
code with Symbol::gensym, which is reasonably light-weight:
@@ -710,7 +714,8 @@ into human-readable form.
Here's an example:
$write_secs = (stat($file))[9];
- print "file $file updated at ", scalar(localtime($file)), "\n";
+ printf "file %s updated at %s\n", $file,
+ scalar localtime($write_secs);
If you prefer something more legible, use the File::stat module
(part of the standard distribution in version 5.004 and later):
@@ -1057,15 +1062,13 @@ request if you doubt its correctness.
Copyright (c) 1997, 1998 Tom Christiansen and Nathan Torkington.
All rights reserved.
-When included as part of the Standard Version of Perl, or as part of
-its complete documentation whether printed or otherwise, this work
-may be distributed only under the terms of Perl's Artistic License.
-Any distribution of this file or derivatives thereof I<outside>
-of that package require that special arrangements be made with
-copyright holder.
-
-Irrespective of its distribution, all code examples in this file
-are hereby placed into the public domain. You are permitted and
-encouraged to use this code in your own programs for fun
-or for profit as you see fit. A simple comment in the code giving
-credit would be courteous but is not required.
+When included as an integrated part of the Standard Distribution
+of Perl or of its documentation (printed or otherwise), this works is
+covered under Perl's Artistic Licence. For separate distributions of
+all or part of this FAQ outside of that, see L<perlfaq>.
+
+Irrespective of its distribution, all code examples here are public
+domain. You are permitted and encouraged to use this code and any
+derivatives thereof in your own programs for fun or for profit as you
+see fit. A simple comment in the code giving credit to the FAQ would
+be courteous but is not required.