In Perl, bless associates a reference with a class, making it an object. The ref() function returns the class name of a blessed reference. Here, an empty hashref {} is blessed into 'MyClass', so ref($val) returns 'MyClass'. TRUE would be from a boolean context, 1 is numeric truth, and 'Object Reference' is not what ref() returns for a blessed object.