use warnings; use strict; my @commands = 'print "hello", print "world"'; foreach my $command(@commands) { $command; }