in reply to Printing to a file not working

Thanks for all the help. Apparently taking a few years off from doing anything with Perl had me forget some of the smaller details.. I changed ">text.txt" to ">./text.txt" and that seemed to fix the problem