The only thing logically wrong is that %sig must exist before the comparison is made; spacing, parentheses, and simple arithmetic without $calc are not incorrect.