http://www.perlmonks.org?node_id=1227850


in reply to Array value changing for some reason

You don't have to return anything to change an array.
#!/usr/bin/perl sub plus { for (@_) {$_++} } my @foo=(1,2,3,4); plus(@foo); for(@foo) {print "$_\n"};
Prints out:
2
3
4
5