Using chdir to change the current directory : chdir « File « Perl






Using chdir to change the current directory

    

chdir '..';

opendir(DIRECTORY, '.') 
    or die "Can't open directory.";

print join (', ', readdir(DIRECTORY));

closedir DIRECTORY;

   
    
    
    
  








Related examples in the same category

1.Change a directory
2.Change dir with chdir