[ale] perl inquiry

The Don Lachlan ale-at-ale.org at unpopularminds.org
Thu Jun 2 00:18:20 EDT 2011


On 06/01/2011 08:54 AM, Geoffrey Myers wrote:
> I have the following constuct:
> %hash = ($db =>  { transaction =>  1,
> 			locked =>  1,
> 			tables =>  ["table1", "table2"]
> 	}
> );
> How do I add additional tables to the tables array?

push(@{$hash{'tables'}}, "table3");

$hash{'tables'}[99] = "table99";

If you do a web search for "hash of arrays" you'll find more of what 
you're looking for.

http://docstore.mik.ua/orelly/perl/prog3/ch09_02.htm

-L


More information about the Ale mailing list