in reply to Re^3: Colorize
in thread Colorize

And be sure that's in a BEGIN block, not just a naked block, or else there's a chance that the initializer for @colors might not have run yet.

Wrong:

{ my @colors=(...); sub colorize { ... } }

Right:

BEGIN { my @colors=(...); sub colorize { ... } }

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.