my @numword = qw( zero one two three four five six seven eight nine ten ); my $i = 0; ${ "f_" . $numword[ $i++ ] } = $_ for split //, $string;