So, I never knew this and I want to get some clarifcation on it. I know if you do
foreach (@list){
if you change $_ in that loop it will affect the actual data. But, I did not know that if you did
foreach my $var1 (@list){
If you changed $var1 in the loop it would change the actual data. :-/ So, is there a way to loop over @list but keep the variable a read-only copy, or a copy that if changed will not change the value in @list?