while ($string){ read $string, $chunk, 4; if ($chunk =~ FFFF); print ("corrupted"); ;