in reply to Re: Schizophrenic var
in thread Schizophrenic var

All scalars are already schizophrenic

This has little to do with the values, and more with the operations you are doing. If a value starts with a number, it will be treated as that number when used in numeric operations. And it will issue a warning if it is followed by non-numeric data, as you demonstrated. "0z" is not comparing as "less than zero", it is comparing equal to zero. And the ++ operator has two different functions depending on what type of input it is given.

This is even more weird.. I want to see if the numeric part of a filehandle was the same of what fileno returned.. it would be fun.. but no fileno

The value shown is a GLOB reference, which internally contains the file handle in its IO slot. All references, aside from objects using overloading, numify to their refaddr.

$ perl -le'my $ref = []; print $ref; printf "%s(0x%x)", ref $ref, 0+$ref;'
ARRAY(0x15500a648)
ARRAY(0x15500a648)