Changeset 16153 for docs/Perl6/Spec
- Timestamp:
- 05/01/07 18:46:51 (19 months ago)
- Files:
-
- 1 modified
-
docs/Perl6/Spec/IO.pod (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
docs/Perl6/Spec/IO.pod
r15657 r16153 12 12 Contributions: Mark Stosberg <mark@summersault.com> 13 13 Date: 12 Sep 2006 14 Last Modified: 8 Feb200715 Version: 1 614 Last Modified: 1 May 2007 15 Version: 17 16 16 17 17 This is a draft document. Many of these functions will work as in Perl 5, … … 299 299 =item print LIST 300 300 301 =item .print(FILEHANDLE) 302 301 303 =item .print 302 304 … … 307 309 more complicated than a variable should be put into parentheses. 308 310 309 If FILEHANDLE is omitted, prints to standard output. 310 The form with leading dot prints C<$_> to standard output. 311 If FILEHANDLE is omitted, prints to C<$*DEFOUT>, which is aliased to C<$*OUT> 312 when the program starts but may be temporarily or permanently rebound to 313 some other file handle. The form with leading dot prints C<$_> to C<$*DEFOUT> 314 unless an explicit filehandle is supplied. 315 311 316 It is a compiler error to use a bare C<print> without arguments. 312 317 (However, it's fine if you have an explicit argument list that evaluates to … … 317 322 properties to change line endings. 318 323 319 =item printf 324 =item say FILEHANDLE: LIST 325 326 =item FILEHANDLE.say(LIST) 327 328 =item FILEHANDLE.say: LIST 329 330 =item say LIST 331 332 =item .say(FILEHANDLE) 320 333 321 334 =item say 322 335 323 This is a version of print() that auto-appends a newline: 336 This is identical to print() except that it auto-appends a newline after 337 the final argument. 324 338 325 339 Was: print "Hello, world!\n"; … … 328 342 As with C<print>, it is a compiler error to use a bare C<say> without 329 343 arguments. 344 345 =item printf(FORMAT, LIST) 346 347 =item .printf(FORMAT, LIST) 348 349 The function form works as in Perl 5. The method form works on 350 filehandle objects, not formats. 330 351 331 352 =back
