X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlfaq5.pod;h=83e34942c06c732ebf69bc762c831d3eecdf5706;hb=351f32542342b92f7303dec0a812c5301714120f;hp=d3c8c9648682e296d92d790b406a93d57df66818;hpb=c90536beb27cceed5693cccebf4f9a4c141f5d8a;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlfaq5.pod b/pod/perlfaq5.pod index d3c8c96..83e3494 100644 --- a/pod/perlfaq5.pod +++ b/pod/perlfaq5.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq5 - Files and Formats ($Revision: 1.17 $, $Date: 2002/05/23 19:33:50 $) +perlfaq5 - Files and Formats ($Revision: 1.18 $, $Date: 2002/05/30 07:04:25 $) =head1 DESCRIPTION @@ -42,7 +42,7 @@ per-filehandle variables. Some idioms can handle this in a single statement: select((select(OUTPUT_HANDLE), $| = 1)[0]); - + $| = 1, select $_ for select OUTPUT_HANDLE; Some modules offer object-oriented access to handles and their @@ -162,11 +162,11 @@ You can then pass these references just like any other scalar, and use them in the place of named handles. open my $fh, $file_name; - + open local $fh, $file_name; - + print $fh "Hello World!\n"; - + process_file( $fh ); Before perl5.6, you had to deal with various typeglob idioms @@ -175,7 +175,7 @@ which you may see in older code. open FILE, "> $filename"; process_typeglob( *FILE ); process_reference( \*FILE ); - + sub process_typeglob { local *FH = shift; print FH "Typeglob!" } sub process_reference { local $fh = shift; print $fh "Reference!" }