in reply to Recursive string building: stepwise and final strings differ
As we can see, it prints $_[1] and appends $_[1]. Of course, the value of $_[1] should be exactly the same each time (barring a weird use of tied scalars).sub verbose_add_content { printf "depth: %d adding: ((%s))\n", $depth, $_[1]; $_[0] .= $_[1] }
So, my best guess is that something else is going on. Is it possible that the script you're editing and the script you're running are two different files? I've made that mistake a few times.
If the bug doesn't reveal itself soon, you may want to package up all the files involved, put them on the web, and post a link, so that other monks can download it and run the same test you're using.
|
|---|