That code will read each line from each file.  The problem is likely in the
part that says:

#[process the lines & hash construction.]

What are you doing there?

On Wed, Jul 12, 2017 at 3:23 PM perl kamal <kamal.p...@gmail.com> wrote:

> Hello All,
>
> I would like to read multiple files and process them.But we could read the
> first file alone and the rest are skipped from the while loop. Please
> correct me where am i missing the logic.Thanks.
>
> use strict;
> use warnings;
> my @files=qw(Alpha.txt Beta.txt Gama.txt);
>
> foreach my $file (@files)
> {
> open (my $FH, $file) or die "could not open file\n";
>
> while( my $line = <$FH> ){
> #[process the lines & hash construction.]
> }
> close $FH;
> }
>
> Regards,
> Kamal.
>

Reply via email to