in reply to How come @_ gets changed here?
If I throw in print Dumper(@_), I get this:Before calling the sub test_this @arr: 1 2 3 4 5 6 7 8 9 10 Inside the sub, before the map @arr: 1 2 3 4 5 6 7 8 9 10 Inside the sub, before the map @_ = 1 2 3 4 5 6 7 8 9 10 Inside the sub, after the map @arr: 2 4 6 8 10 12 14 16 18 20 Use of uninitialized value $_[0] in join or string at foo line 11. Use of uninitialized value $_[3] in join or string at foo line 11. Use of uninitialized value $_[6] in join or string at foo line 11. Use of uninitialized value $_[9] in join or string at foo line 11. Inside the sub, after the map @_ = _ Use of uninitialized value $_[0] + in join or string at foo line 11. _ Use of uninitialized value $_[3] in join or string at foo line 11. _ Use of uninitialized value $_[6] in join or string at foo line 11. After calling the sub test_this @arr: 2 4 6 8 10 12 14 16 18 20
Anyone know what's going on?panic: attempt to copy freed scalar 7fe03e8040b0 to 7fe03e82c858 at /o +pt/local/lib/perl5/5.26/darwin-thread-multi-2level/Data/Dumper.pm lin +e 602.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How come @_ gets changed here?
by haukex (Archbishop) on Jun 10, 2017 at 15:37 UTC | |
by dave_the_m (Monsignor) on Jun 10, 2017 at 18:07 UTC | |
by haukex (Archbishop) on Jun 11, 2017 at 13:09 UTC | |
by Anonymous Monk on Jun 10, 2017 at 18:56 UTC | |
by dave_the_m (Monsignor) on Jun 10, 2017 at 19:04 UTC | |
by LanX (Saint) on Jun 10, 2017 at 19:16 UTC | |
by LanX (Saint) on Jun 10, 2017 at 19:08 UTC | |
|
Re^2: How come @_ gets changed here?
by LanX (Saint) on Jun 10, 2017 at 15:37 UTC |