my $i = 0; while (my ($args1, $args2) = split('.', $_myfile[$i++])) { print "$args2\n"; }