chewtoy has asked for the wisdom of the Perl Monks concerning the following question:
I'll sum up by saying that I have code where join seems to be just plain not working, broken.
I have a little bit of code that looks like this:
The problem is that only the first print statement causes anything to be printed. The first print statement causes @lines to be printed, but the second one doesn't. In other words, the first construction works, but using join seems to just eat the array. BUT only on win32 - on linux it works fine. I even thought maybe it was just a 5.6.0 bug, so I updated to activestate's 5.6.1 - same prob.print @lines; # prints array, no prob. print join("", @lines); # prints array, but not on win32.
Even more frustrating is that I can't cause this reliably - I tried to tear it down into a simple test case...but the test case doesn't exibit the bug. I'm going insane. But I swear that damned join is NOT working and I can't imagine why. :-(
I would feel better if I could make a test case fail, but I can't and I can't imagine any difference between the simplest test case and my actual code. I mean the first line works and the second one doesn't - how can it be simpler?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: I think I'm going insane. Join doesn't work?
by pepik_knize (Scribe) on Mar 21, 2002 at 06:28 UTC | |
|
Re: I think I'm going insane. Join doesn't work?
by Anonymous Monk on Mar 21, 2002 at 03:28 UTC | |
|
Re: I think I'm going insane. Join doesn't work?
by Bobcat (Scribe) on Mar 21, 2002 at 03:08 UTC | |
|
Re: I think I'm going insane. Join doesn't work?
by erikharrison (Deacon) on Mar 21, 2002 at 13:24 UTC |