my @array = ("bob","jones","dick"); foreach my $guys (@array) { print $guys; my @output= $t->cmd("sh clock"); print @output; }