the line
$a = 1.2.3;
can't be interpreted as a number because of improper format, so perl uses it's definition of '.' operation - concatenates strings that are represented by your 1,2 and 3, which in hex code give you your 'junk' strings.
in your other cases it just treats variables as strings, and concatenates them