foreach loop and $_
#!/usr/bin/perl @colors=(red, green, blue, brown); foreach (@colors) { print "$_ "; $_="YUCKY"; } print "\n@colors\n";