my @array = qw( foo bar baz ); for (@array) { eval "$_ = 'value'"; # Error here!!! }