I've stumbled upon something in the interpreter that I don't understand. While debuging a loop I added the following debug statement to see what was going on
warn "row=$row col=$col row->[col]=", $row->[$col], ";\n";
Fairly dull stuff, but I noticed that one of these debug lines was printed twice, and the first of the two lines had a ' (#1)' suffix tacked on the end. Correction: after the semicolon, but before the \n so it isn't quite the end but very close. As only one line out of hundreds had this, I was confused. Here is what I was seeing:
row=ARRAY(0x98e2c20) col=0 row->[col]=-output_format; row=ARRAY(0x98e2c20) col=1 row->[col]=csh; row=ARRAY(0x98e2c20) col=2 row->[col]=variable syntax; (#1) row=ARRAY(0x98e2c20) col=2 row->[col]=variable syntax; row=ARRAY(0x98e0de8) col=0 row->[col]=-platform; row=ARRAY(0x98e0de8) col=1 row->[col]=linux; row=ARRAY(0x98e0de8) col=2 row->[col]=$PLATFORM;
It appears that having syntax in a line sent written with warn gets duplicated and has ' (#1)' tacked on. I don't see this with print STDERR nor if I replace 'syntax' with another word.
Have I stumbled on some strange error detection logic I've never seen before? FWIW I'm using v5.10.0 on Ubuntu 9.04. I'm a good little monk, so I have use strict; and use warnings; at the top.
-doug
In reply to warn altering a line containting the word 'syntax' by doug
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |