Basic HTML version of Foils prepared March 30 97

Foil 70 Default Filehandles and Formats (Chapter 11 of Llama Book)

From PERL4 Tutorial for CPS616 Computational Science for Information Age Course CPS616 -- February 1995. by Geoffrey C. Fox


1 print and write without specific file handles output on currently selected filehandle.
2 select(FILEHANDLE_NEW) sets new filehandle FILEHANDLE_NEW and returns old (current) filehandle.
3 $oldhandle = select(NEWHANDLE);
4 $~ = "Newformat"; or $FORMAT_NAME instead of $~ if use English
5 select($oldhandle); # ingeniously sets "Newformat" to be format associated with NEWHANDLE
6 One can have lots of FILEHANDLES and lots of formats but each FILEHANDLE is only associated with one format at a time.

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Sep 6 1997