Re: perl hex possible bug

2020-07-21 Thread Philip Guenther
On Tue, Jul 21, 2020 at 3:12 PM Edgar Pettijohn wrote: > I was playing around with the hex function in perl. So naturally I > started with: > > perldoc -f hex > > Which showed me a few examples namely the following: > > print hex '0xAf'; # prints '175' > print hex 'aF'; # same >

Re: perl hex possible bug

2020-07-21 Thread Andrew Hewus Fresh
I realized after the fact, that looking at some of the different ways you can write numbers in perl. $n = 1234; # decimal integer $n = 0b1110011; # binary integer $n = 01234; # octal integer $n = 0x1234;# hexadecimal integer $n = 12.

Re: perl hex possible bug

2020-07-21 Thread Andrew Hewus Fresh
On Tue, Jul 21, 2020 at 07:10:34PM -0500, Edgar Pettijohn wrote: > I was playing around with the hex function in perl. So naturally I > started with: > > perldoc -f hex > > Which showed me a few examples namely the following: > > print hex '0xAf'; # prints '175' > print hex 'aF'; #

perl hex possible bug

2020-07-21 Thread Edgar Pettijohn
I was playing around with the hex function in perl. So naturally I started with: perldoc -f hex Which showed me a few examples namely the following: print hex '0xAf'; # prints '175' print hex 'aF'; # same $valid_input =~ /\A(?:0?[xX])?(?:_?[0-9a-fA-F])*\z/ However, I g