Yes. But use warnings is more powerful and localized to the module it is used in. If/when you upgrade to 5.6 or later then try to get into the habit of using warnings and not -w.
As for the code, it looks ok to me. (In principle.) Although I might write
instead. Andmy $bita=pack("C,hex($bit));
Also it would be a good idea to get into the habit of indenting properly. You can check out the tool "PerlTidy" hosted on source forge to do have it done automatically for you. perlstyle will have some hints for you with regard to programming style. For instance $RH is not the best var name. To me it implies a filehandle or something else with "mystic" overtones (due to its captialization). I would probably have just used $red instead...my($RH,$GH,$BH)=($color =~ /(..)(..)(..)/);
Ultimately it looks like you are on the right path... Keep it up!
HTH
--- demerphq
my friends call me, usually because I'm late....
In reply to Re: Strict, my and warnings
by demerphq
in thread Many strings make one variable?
by heezy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |