in reply to Interesting Mistake

m/IDX/ returns true (1) if $_ matches the pattern and false otherwise. ~ is the bitwise not operator (aka one's complement - see Symbolic Unary Operators). It inverts all the bits in a number.

Your match doesn't match $_ and so returns false, which is complemented to 0xffffffff, which, in decimal, prints as 4294967295.

Try

perl -e 'print ~0'
or, for 64-bit perl:

perl -e 'print ~0 & 0xffffffff'

Update: Added code examples & link to ~ in perlop