programming-examples/perl/File/Using chdir to change the current directory.pl
2019-11-15 12:59:38 +01:00

11 lines
150 B
Perl

chdir '..';
opendir(DIRECTORY, '.')
or die "Can't open directory.";
print join (', ', readdir(DIRECTORY));
closedir DIRECTORY;