On Sat, Jun 09, 2001 at 08:12:48PM -0000, [EMAIL PROTECTED] wrote:
> 
> This is a bug report for perl from [EMAIL PROTECTED],
> generated with the help of perlbug 1.26 running under perl 5.00503.
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> 
> From perlfunc(1):
> 
>   oct EXPR    ...
>               (If EXPR happens to start off with 0x, interprets
>               it as a hex string.  If EXPR starts off with 0b,
>               it is interpreted as a binary string.)
> 
> But the binary string conversion doesn't seem to work:
> 
>   natto% perl -e 'print oct("0b11000110")."\n"'
>   0
> 
> This is otherwise a valid binary string:
> 
>   natto% perl -e 'print unpack('C', (pack("B8", "11000110")))."\n"'
>   198
> 
> The hex string conversion function does work:
> 
>   natto% perl -e 'print oct("0xC6")."\n"'
>   198

The following comments pertain to the version of Perl used in FreeBSD,
since this was cited as a FreeBSD 4.0 problem.

This is still true for Perl 5.005_03 in -stable, but it seems to have
been fixed in Perl 5.6.0 in -current.  I believe this will be fixed
when Perl 5.6 is MFC'd (btw, FreeBSD developers, FreeBSD Perl gurus,
when/if shall Perl 5.6 be MFC'd? :)

Thus, I believe this is not (anymore) a Perl problem per se, since it
is fixed in the newer versions.

G'luck,
Peter

-- 
If I had finished this sentence,

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to