in reply to array and hash

Well, you can do something like this
#untested, no perl on the current machine... my @array= qw ( command1 command2 command3); my %hash = (); foreach (@array) { $output = eval($_); $hash->{$_}= $output; } sub command1() { # do something return 1; }
can be done shorter, more efficient, but gives the idea to you.

"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.