in reply to Directory name as command line argument

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"; }
Pancho

Replies are listed 'Best First'.
Re^2: Directory name as command line argument
by max210 (Novice) on Mar 27, 2008 at 18:03 UTC
    Great Help. You are life saver :)