use strict; use warnings; use 5.010; my @answers = qw{yes no maybe}; for my $string (@answers) { say $string; #or do something else to $string }