You're printing to a file after you've closed it. Using -w in your script would have caught this problem.
Also, you need to check the return value from open like this:
open(COLORS, ">>colors.txt") || die "Can't open colors.txt: $!\n";
In reply to Re: how do I write directly to a file
by davorg
in thread how do I write directly to a file
by Fathersuperior
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |