http://qs321.pair.com?node_id=177917

Ever wish the "magical autoincrement" would generate things that start with A-F, then have a digit, then one of P, Q, and R in cycles? Well, write one!
my $generator = sub { scalar glob "{A,B,C,D,E,F}{0,1,2,3,4,5,6,7,8,9}{ +P,Q,R}" }; ... while ($_ = &$generator) { print "$_\n"; # sample usage }