in reply to Re: How to open() something in a hash?
in thread How to open() something in a hash?

Strange how you find the answer yourself just when you've asked for help... =)

You're right, there was nothing wrong with opening the file. I just had forgotten to do $self->{LOGHANDLE}->autoflush(1) which was kinda essential since my tests consisted of starting up the bot, spamming a few lines in irc to see if it logged anything and then killing it with ^C since I hadn't bothered to implement any cleaner way to shut down the bot yet. =)

By the way, you can use  print { $self->{fh} } "Hello world\n"; to print to a file handle that isn't just a simple scalar. ;)

Thanks for the help anyways!