M
Malcolm Hoar
I believe I may have found a bug in ActivePerl 5.12.1.1201 (64-bit).
This problem does *not* arise with ActivePerl 5.10.1.1007 (64-bit).
Both running on Windows 7 64-bit with all current hot fixes.
Unfortunately, I have not yet been able to isolate the problem
code from a large and proprietary program.
Howeber, in short, we clear a large array:
@Big1 = ();
The specific elements of the array are populated:
$Big1[$index] = $value;
However, the array contains many "holes" (undefined elements).
So, this amounts to something like:
$Big1[538] = 0;
$Big1[53487] = 1;
$Big1[35306] = 2;
etc.
Later, we interate over the array:
foreach $key (@Big1) {
$len = length ($key);
if ($len) {
if ($key eq '' && $len == 4) {print "You're kidding me!\n"; }
Where we encounter a bizarre situation whereby an element
is undefined but has a positive length.
I have tried to create a small standalone program that
demonstrates the problem but without any success.
I did try logging the values used to populate @Big1 and
wrote a standalone that would fill an array with the
same data. However, that did not exhibit the problem.
Is anyone aware of any similar issues or have any
suggestions that might help me create a standalone
program to demonstrate the problem?
--
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Malcolm Hoar "The more I practice, the luckier I get". |
| (e-mail address removed) Gary Player. |
| http://www.malch.com/ Shpx gur PQN. |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This problem does *not* arise with ActivePerl 5.10.1.1007 (64-bit).
Both running on Windows 7 64-bit with all current hot fixes.
Unfortunately, I have not yet been able to isolate the problem
code from a large and proprietary program.
Howeber, in short, we clear a large array:
@Big1 = ();
The specific elements of the array are populated:
$Big1[$index] = $value;
However, the array contains many "holes" (undefined elements).
So, this amounts to something like:
$Big1[538] = 0;
$Big1[53487] = 1;
$Big1[35306] = 2;
etc.
Later, we interate over the array:
foreach $key (@Big1) {
$len = length ($key);
if ($len) {
if ($key eq '' && $len == 4) {print "You're kidding me!\n"; }
Where we encounter a bizarre situation whereby an element
is undefined but has a positive length.
I have tried to create a small standalone program that
demonstrates the problem but without any success.
I did try logging the values used to populate @Big1 and
wrote a standalone that would fill an array with the
same data. However, that did not exhibit the problem.
Is anyone aware of any similar issues or have any
suggestions that might help me create a standalone
program to demonstrate the problem?
--
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Malcolm Hoar "The more I practice, the luckier I get". |
| (e-mail address removed) Gary Player. |
| http://www.malch.com/ Shpx gur PQN. |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~