use strict; use warnings; my $dir = shift @ARGV; # Get first command line argument opendir DIR, $dir or die $!; # Open Directory for my $file ( readdir(DIR) ){ # Loop through reading each file print "$file \n"; }
In reply to Re: Directory name as command line argument
by Pancho
in thread Directory name as command line argument
by max210
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |