>>>>> "SR" == Sayth Renshaw <flebber.c...@gmail.com> writes:
>> Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com -- >> ----- Perl Code Review , Architecture, Development, Training, Support ------ >> --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- >> please don't quote signatures. edit the quoted email to show only the parts you are replying to. SR> The sprintf function was copied from Perl Monks SR> http://www.perlmonks.org/?node_id=63074, I am only finishing chapter 2 SR> in beggnng Perl so I don't fully understand it yet. so wait until you understand it to use it! :) >> are only converted to decimal values by default. you need the hex and/or >> oct functions to explicitly convert a hex/octal string to a decimal >> value which can then be compared. SR> Does this mean I could not directly compare a hex created from a SR> decimal with a decimal? no. perl only stores numbers in one way, as integers (we aren't getting into floats or binary format here). only when you convert to/from a string does decimal/hex/oct come into play. SR> so hex == dec && oct == dec && hex == oct. well, if that were legal perl it would be better. and you have one extra unneeded comparison. once the first two pass, the third must always pass. uri -- Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/