A Code Monkey's Blog

How to quote long command in Perl system()

If you call external command in your Perl code with system() and your command is very long, you must want to break it into multi-line but the newline characters really get in the way.  Here is a good way, IMHO,  to make the code look neat and clean:

# Annotate the ...

Cautious about colorExact() and colorAllocate() in Perl GD package

For exising colors, I think it is better to use colorExact() because the color indices would be consistent among images. For new colors, colorAllocate() is the only choice. But colorAllocate() is highly recommended to use after colorExact(). It is safer to the color palette.