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
In reply to Re: variables with colons
by Sue D. Nymme
in thread variables with colons
by SavannahLion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |