use strict; use warnings; my @array = ( 1 .. 5 ); foreach my $value ( @array ) { $value--; } print join( ', ', @array ), "\n"; # 0, 1, 2, 3, 4