in reply to warning: tied vars may evaluate twice in logical expressions

merlyn mentioned what I believe to be a similar bug, while writing the code to one of his most recent articles. I don't think the article explaining this code is online yet, but it relates to traversing a file system.

To see the bug in action, save the code to something like tiefinder.pl. Uncomment the 'DEBUG: fetching' line and invoke something like ./tiefinder.pl /tmp You should notice the DEBUG line getting printed twice as often as you might expect.

I don't have an answer for you (and at the time, neither did merlyn) but perhaps this can help you zero in on the problem.

-Blake