in reply to variables with colons

Neighbour, above, gave you a good tip about using braces to disambiguate variable names.

There’s another way, not as general-purpose, but quick and dirty for the kind of thing you're doing: use a backslash.

print "$typ\::$dat\n";

HTH