diff options
author | Tom Christiansen <tchrist@perl.com> | 1998-07-05 04:15:22 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-05 21:38:39 +0000 |
commit | c8db1d390b3c3dc30ed6bb39e447da74c0430a6d (patch) | |
tree | aab028a09324078b77c8720330e1ed37f2281c05 /pod/perlfaq5.pod | |
parent | 625ca0ef1ad7060d558556613e7fbcdabcef30a9 (diff) | |
download | perl-c8db1d390b3c3dc30ed6bb39e447da74c0430a6d.tar.gz |
applied patch (via private mail), modulo retrohunks in pod/perlfaq2.pod
Subject: Re: docpatch
Message-Id: <199807051515.JAA03644@jhereg.perl.com>
p4raw-id: //depot/perl@1325
Diffstat (limited to 'pod/perlfaq5.pod')
-rw-r--r-- | pod/perlfaq5.pod | 31 |
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. |