in reply to Why do I get this error?
LanX is right about $" being a standard variable and global. He is also right that its default value must have been changed somewhere (possibly in a module you use) to undef to raise the warning you are seeing.
You can "fix" the value of $" by:
local $" = ' '; open ...
which restores the default space used for $".
If you recently added use warnings to your script that would show a warning for a nasty condition that you previously weren't aware of. An array interpolated into as string behaves like:
my $arrayStr = join $", @{$table_A[$d]}; my $row1 = "$arrayStr";
so the undef value in $" would have turned into an empty string and the array elements would have been stuck together instead of separated by single spaces.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why do I get this error?
by LanX (Saint) on May 12, 2014 at 02:19 UTC |