#!/usr/bin/perl -wlaF, BEGIN { open FH, '<', 'FileB' } print "Loop tot-> $F[4]"; for ( 1 .. $F[4] ) { @G = split ',', ; print join ',', $F[0], $G[0], $F[2]; }