X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlfaq5.pod;h=98e706afadd3e8b182e1ecd13fc5c68b4a0b4432;hb=f648820cb158526d3c3e16f712206316f2112b7e;hp=41c46a3dae9e964eefab5d43c9298c7000945ecb;hpb=5a964f204835a8014f4ba86fc91884cff958ac67;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlfaq5.pod b/pod/perlfaq5.pod index 41c46a3..98e706a 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 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 -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. + +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.