Wayne Simmons wrote:
> First off ALWAYS "use strict;" it's just a waste not to.

Sound advice. Also, "use warnings;" as well.
> 
> At your assignment: "$number = ;" I assume you put in a value here by
> hand, (hard coded). You should have shown an example of this.  If
> you just type
> "$number = 01010001" then perl will take it as a hexadecimal number
> and thus the 16.  Basically if you start a number with 0 it is
> considered to be hex. If however you assign the number like this:
> $number = '000101010' then it works just fine for me.

Not correct.

>From 'perldoc perldata'

    0xff                # hex
    0xdead_beef         # more hex   
    0377                # octal
    0b011011            # binary

HTH

-- 
Brian Raven
 


-----------------------------------------------------------------------
The information contained in this e-mail is confidential and solely 
for the intended addressee(s). Unauthorised reproduction, disclosure, 
modification, and/or distribution of this email may be unlawful. If you 
have received this email in error, please notify the sender immediately 
and delete it from your system. The views expressed in this message 
do not necessarily reflect those of LIFFE Holdings Plc or any of its subsidiary 
companies.
-----------------------------------------------------------------------


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to