Help for this page

Select Code to Download


  1. or download this
    opendir ( my $dir, "/mnt/data/Programming")
       or die "Can't open directory: $!\n";
    my @files = readdir( $dir );
    closedir( $dir );
    
  2. or download this
    foreach my $file ( grep { -f "$path/$_" } @files )
    {
    ...
            # process each line here.
        }
    }