Cari di Perl 
    Perl User Manual
Daftar Isi
(Sebelumnya) Print debugging infoConvert a list into a binary r ... (Berikutnya)
Input and output functions

Print a picture record

Daftar Isi

  • write FILEHANDLE

  • write EXPR
  • write

    Writes a formatted record (possibly multi-line) to the specified FILEHANDLE,using the format associated with that file. By default the format fora file is the one having the same name as the filehandle, but theformat for the current output channel (see the select function) may be setexplicitly by assigning the name of the format to the $~ variable.

    Top of form processing is handled automatically: if there is insufficientroom on the current page for the formatted record, the page is advanced bywriting a form feed, a special top-of-page format is used to format the newpage header before the record is written. By default, the top-of-pageformat is the name of the filehandle with "_TOP" appended. This would be aproblem with autovivified filehandles, but it may be dynamically set to theformat of your choice by assigning the name to the $^ variable whilethat filehandle is selected. The number of lines remaining on the currentpage is in variable $-, which can be set to 0 to force a new page.

    If FILEHANDLE is unspecified, output goes to the current default outputchannel, which starts out as STDOUT but may be changed by theselect operator. If the FILEHANDLE is an EXPR, then the expressionis evaluated and the resulting string is used to look up the name ofthe FILEHANDLE at run time. For more on formats, see perlform.

    Note that write is not the opposite of read. Unfortunately.

 
Source : perldoc.perl.org - Official documentation for the Perl programming language
Site maintained by Jon Allen (JJ)     See the project page for more details
Documentation maintained by the Perl 5 Porters
(Sebelumnya) Print debugging infoConvert a list into a binary r ... (Berikutnya)