in reply to Array value changing for some reason
You don't have to return anything to change an array.
Prints out:#!/usr/bin/perl sub plus { for (@_) {$_++} } my @foo=(1,2,3,4); plus(@foo); for(@foo) {print "$_\n"};
2 3 4 5
|
---|
In Section
Seekers of Perl Wisdom