in reply to How to make it simple?

Above points perfectly good, but if you want to keep the variables named (at least in a sense), then use a hash and an array of keys:
my @names = qw( a b c d e f g ); my %var; @var{@names} = splice(@array, 0, 8); foreach my $name (@names) { $var{$name} =~ s/\.//g; } # now, you can reference what was $a in your old code as $var{a}, etce +tera
------------ :Wq Not an editor command: Wq