#!/usr/bin/perl use strict; use warnings; my $dirname = <STDIN>; #chomp($dirname); opendir(DIR, $dirname) or die "Can't opendir $dirname : $!\n"; while (defined(my $file = readdir(DIR))) { print "$file\n"; } closedir(DIR);
In reply to Traverse a directory by singho
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |