in reply to Interesting (split) oddity with 5.6.1, fixed in 5.8.0
That's a real complicated set of factors required to caused the bug manifest.
The simplest I've been able to reduce it to is
sub list{ ( '1', '2', '3', '4', '5' ) } print @a=( list() )[0,0];
From what I can work out, the following circumstances are required
Removing any one of these factors and the bug doesn't occur.
sub list{ ( 1, 2, 3, 4, 5 ) } print @a=( list() )[0,0]; 11 sub list{ ( '1', '2', '3', '4', '5' ) } print +(l())[0,0] 11 sub list{ ( '1', '2', '3', '4', '5' ) } print @a=( list() )[0,1]; 12 print @a=( list() )[1,0]; 21 sub list{ ( '1', '2', '3', '4', '5' ) } print @a=( list() )[0,0]; 1 Use of uninitialized value in print ...
It would be interesting to know if this was fixed accidently for 5.8.0, or whether someone sat down and tracked down the cause from the symptoms. If it was the latter, that would have been one educational debugging session to have watched.
|
|---|