Basic HTML version of Foils prepared Sept 20 97

Foil 68 Directory Access

From Tutorial on PERL Computational Science for Information Age Course CPS616 -- Sept 20 97. by Geoffrey C. Fox,Nancy McCracken,Tom Scavo


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 Sun Sep 21 1997