Re: hex conversion to dec - print and printf differences

2006-04-11 Thread Offer Kaye
On 4/11/06, John W. Krahn wrote: > > This is probably trivial, but I couldn't find a mention of this > > anywhere - why do the following 2 code lines produce different > > results? > >>perl -e 'printf "%d\n" ,0x_' > > -1 > >>perl -e 'print 0x_ , "\n"' > > 4294967295 > > perldoc perl

Re: hex conversion to dec - print and printf differences

2006-04-11 Thread John W. Krahn
Offer Kaye wrote: > On 4/11/06, John W. Krahn wrote: >>>This is probably trivial, but I couldn't find a mention of this >>>anywhere - why do the following 2 code lines produce different >>>results? perl -e 'printf "%d\n" ,0x_' >>>-1 perl -e 'print 0x_ , "\n"' >>>4294967295 >

Re: hex conversion to dec - print and printf differences

2006-04-11 Thread John W. Krahn
Offer Kaye wrote: > Hi, Hello, > This is probably trivial, but I couldn't find a mention of this > anywhere - why do the following 2 code lines produce different > results? >>perl -e 'printf "%d\n" ,0x_' > -1 >>perl -e 'print 0x_ , "\n"' > 4294967295 perldoc perlnumber John --