Dear list,
I want to parse through some files of a list of directories. Every directory
have the same files, which means that I can make a loop and repeat the
process for each directory. I managed to write the code to process the files
of a single directory but I do not exaclty how to read a list of directories
and open one by one. I can only print the directories that are in the
parental directory , but I can't make the script to open the directory and
read the list of files. I do not what is the function to use to either open
everydir or read the 'subdirectories'. I hope someone can help
The beginning of the script looks like:

#! /usr/bin/perl
use strict;
use warnings;

my $pwd=$ENV{'PWD'};
 my @filedir =<*ctt>;
 foreach my $filedir (@filedir) {
     opendir ($filedir) || die  "can't \n";
      my @f = <mlc*>;
      foreach my $f(@f) {
   open (IN,"$f") or die "$!\n";
   print "$f\n";
   my @a2= (<IN>);
  ...



Thanks in advance,

L. Pardo

Reply via email to