in reply to Re^2: string? Or binary garbage?
in thread string? Or binary garbage?
$a !~ /\p{IsPrint}/
which tests whether $a does NOT match any printing characters. (In other words, the test fails if it DOES match a PRINTABLE character.) So, what I wanted to do is close, but not quite the same thing:
which basically tests "does $a match the compliment of a printing character?" In other words, "are there ANY non-printing characters here?"$a =~ /\P{IsPrint}/
One has to look really closely and speak out the logic into a dark empty room before knowing intuitively which was the right choice ahead of time.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: string? Or binary garbage?
by hakkr (Chaplain) on Dec 01, 2004 at 15:55 UTC |