Nope.

Suppose $numtok(<string>,46) returns 5. That means there are 5 dot delimited tokens.

You are doing $calc($numtok(<string>,46) - 2), which gives 3, which means you'll reference the third token starting from the beginning.

$gettok(<string>,-3,46) references the third string starting from the back.

Riddle me this, riddle me that, where's the -3 token at?

a.b.c.d.e

-1 = e
-2 = d
-3 = c

1 = a
2 = b
3 = c

Suppose $numtok was 6 -> 6-2 = 4, 4th token from the beginning, is the 3rd token from the back.

Etc.