Hello,
This is my very first post, I am using the "Learning Perl" book (7th eddition). I can't find a solution for my problem in this book, and googling has yield no
results.
I want to execute a particular function each time an iteration completes using the while loop:
sub cp_domains {
open(my $fh, $domainFile) or die "Coult not open file '$domainFile
+'";
while (my $row = <$fh>) {
chomp $row;
my @domain = split /:/, $row;
resolve_domain($domain[0]);
}
#close($fh);
}
The first time the “while” loop iterates it would correctly execute the function, but subsequent times is not returning anything.
Can anyone provide me with some guidance?