in reply to Creating an array from a text file

What kind of action do you have in mind, and what is the format of the file? If you have one shell command per line, why not run it in the shell? I'll assume that's not the case. To read a file into an array is elementary:

open FOO, '<', '/path/to/bar.data' or die $!; my @actions = <FOO>; close FOO or die $!;

I'll suppose the actions are keys to a "dispatch table", a hash of coderefs, followed by some arguments, space delimited. Call the hash %action_code.

for (@actions) { my @act = split " "; $action_code{$act[0]}->(@act[1..$#act]); }

If &$action_code{foo} returns a value, you may prefer map to what I have shown.

You made this easy, but maybe pointless, by leaving out all the details.

After Compline,
Zaxo