in reply to text file validation

One simple way is to set the Input Record Separator to 160 and just read one record:
open my $fh, '<', $filename or die "Cannot open '$filename' $!"; $/ = \160; my $data = <$fh>; print $data;