Your function might be replaced by matching the character class for control characters, /\p{IsC}/ (unicode character class, just for fun). That doesn't have anything to do with whether a string contains packed data.
Neither does it have anything do do with whether a scalar is a string. Many text strings contain "\n" or "\t".
After Compline,
Zaxo
In reply to Re^2: Detecting packed data
by Zaxo
in thread Detecting packed data
by vx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |