This is a CGI script. I am validating a credit card number ($cardNum) and trying to format it to look like this: 1234-5678-9012-3456. I have confirmed that $cardNum contains a correct, 16-digit value.
All attempts have resulted in either null or all zero format (0000-0000-0000-0000).
Wish I were smarter....