#!/usr/bin/perl # this code build a table of array-refs keyed to alphabetic # characters. The arrays could be used to hold state transistions. require 5.8.8; use strict; use fields; use Data::Dumper; my $inputs = fields::phash([('a'..'z')], [ map { [1,1] } ('a'..'z')]); $inputs->{c} = [ 0, 1 ]; $inputs->{f} = [ 2, 1 ]; $inputs->{g} = [ 0, 1 ]; print Dumper map { $inputs->{$_} } ( 'a'..'g' ); __END__ Troll [127] as maint ~/ %perl src/symarray.pl [6:40pm] $VAR1 = [ 1, 1 ]; $VAR2 = [ 1, 1 ]; $VAR3 = [ 0, 1 ]; $VAR4 = [ 1, 1 ]; $VAR5 = [ 1, 1 ]; $VAR6 = [ 2, 1 ]; $VAR7 = [ 0, 1 ];