#!/usr/bin/perl use strict; use warnings; my @array = qw/austria bermuda canada denmark england france germany/; for my $country (@array) { print "$country\n"; $country = "old_" . $country; } # WOW!!! # When we modified the variables above we were actually modifying the data in the original list for my $country (@array) { print "$country\n"; } # note foreach and for keywords are identical