my $fcount = 1; while (my $xmlfile = <$list>) { chomp $xmlfile; print STDERR "$0 : about to process file # $fcount = '$xmlfile'\n"; $twig->parsefile($xmlfile); print STDERR "$0 : file $xmlfile' processed OK.\n"; $fcount++; }