Basic HTML version of Foils prepared March 30 97

Foil 74 Directory Access (Chapter 12 of Llama Book)

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


1 chdir($name); transfers to directory specified in $name
2 mkdir($name, mode); # makes directory with given name $name and MODE (typically 3 octal characters such as 0755)
3 opendir(DIRHANDLE,$name); # opens directory with directory handle DIRHANDLE. Such names can be assigned independently of all other names and are in particular not connected with FILEHANDLEs
4 closedir(DIRHANDLE); # closes directory associated with handle DIRHANDLE
5 readdir(DIRHANDLE); # returns file names (including . and ..) in directory with handle DIRHANDLE
  • If scalar result, readdir returns "next" file name
  • If array result, readdir returns all file names in directory

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