#! /usr/bin/perl -w use strict; use warnings; my %digit_letters = ( 2 => [qw(a b c)], 3 => [qw(d e f)], 4 => [qw(g h i)], 5 => [qw(j k l)], 6 => [qw(m n o)], 7 => [qw(p r s)], 8 => [qw(t u v)], 9 => [qw(w x y)], ); foreach my $comb(2222..9999) { combs('', split //, $comb) unless $comb =~ /[10]/; } sub combs { my $word = shift; my $first = shift; foreach my $combination (@{$digit_letters{$first}}) { if (@_) { combs($word.$combination, @_); } else { print "$word$combination\n"; } } }
In reply to Re: Adventures in multilingualism
by inman
in thread Adventures in multilingualism
by revdiablo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |