moof1138 has asked for the wisdom of the Perl Monks concerning the following question:
I made an AIM bot running on Mac OS X, using the Net::AIM module. The bot receives commands, which mostly involve reading and writing a database (with DBI), though sometimes a command will have it read a local file, or read and parse a web page. Everything works, but there is an oddball thing I can't figure out how to debug. If I use open() to open a file, or a pipe to a command, and then explicitly close() the handle, then suddenly I cannot send messages via AIM. Clients show the bot as on-line, it hears messages, and it logs that sends messages, but the messages go nowhere. If I use open() but never explicitly close() anything, then everything works (this is what I am doing now), but I get this bad feeling in the pit of my stomach, and the fact that something somewhere is wrong is bugging me. I have tried different filehandle names, thinking that this might be a namespace related thing, but that made no difference. I am still running the default version of Perl that came with Mac OS X. Does anyone have any pointers as to what I could do to try to debug this? I am using strict, and warnings, but that does not seem relevant for this oddball issue. I tried stepping through it in the debugger, but I could not really figure out what I was looking for.