$ ./3.sscce.pl 1..1 number is 1 number is 8 ["abcdef", "abcdef", "abcde ", " bcdef"] inside first anonymous block index 1 out of range at ./3.sscce.pl line 34. # Looks like your test exited with 255 before it could output anything. $ cat 3.sscce.pl