my @array = (1,2,3,4,5); #### $_ *= 2 for 1,2,3,4,5; # doesn't work because you're modifying constants. @a = (1,2,3,4,5); $_ *= 2 for @a; # modifies @a because @a has copies of the constants instead of the constants themselves