in reply to undef var

My guess is that the . operator forces the return into string context. In the default context, perl prints the result of assigning undef to my ($rec), in string context, it prints whether the assignment of undef to my ($rec) succeeded or failed. Succeed being 1 and fail being 0.