Z
zeroaffinity
I have an array of strings. Each string (called $line) has various html
formatting removed (with s//) to leave a substring that is basically a
concatenated name-value pair.
I'll show the code in a sec, but here is what is strange. When I print
the string and try to append a character, it actually PREpends the
character and overwrites the first character of the string in the
process.
My code:
1 ($name,$value) = split('#',$line);
2 print $value . "*\n";
So $line had a # in it that was a delimiter. I just split it up and
attempted to print the string. This is the output...
*une 6, 2006
If I change line 2 to this: print $value . "**\n"; then I
get the following output:
**ne 6, 2006
The clincher. If I swap $value for $name, this problem goes away. In
fact, the results would be Date* and Date** in the cases above,
respectively. It seems like the data in $value is affecting the
behavior.
What could be causing this?
formatting removed (with s//) to leave a substring that is basically a
concatenated name-value pair.
I'll show the code in a sec, but here is what is strange. When I print
the string and try to append a character, it actually PREpends the
character and overwrites the first character of the string in the
process.
My code:
1 ($name,$value) = split('#',$line);
2 print $value . "*\n";
So $line had a # in it that was a delimiter. I just split it up and
attempted to print the string. This is the output...
*une 6, 2006
If I change line 2 to this: print $value . "**\n"; then I
get the following output:
**ne 6, 2006
The clincher. If I swap $value for $name, this problem goes away. In
fact, the results would be Date* and Date** in the cases above,
respectively. It seems like the data in $value is affecting the
behavior.
What could be causing this?