in reply to Re: Searching for control characters
in thread Searching for control characters

Thanks much for the help. it does work.
#!/usr/bin/perl use strict; use warnings; open F, '<', 'notes.txt_error' or die "Open output file failed: $!"; my $row; my $line; $row = 0; while (<F>) { chomp; $line = $_; $row++; if ( $line =~ /([[:cntrl:]])/ ) { my $c = $1; printf "%u : ||%s||\n", $row, $line; printf "\t : ||%s||\n", ord ($c); print "---------------------------"; } } close F;
produces
150 : || <long line> ||
         : ||3||
---------------------------
206 : || <long line> ||
         : ||9||
---------------------------
317 : || <long line> ||
         : ||28||
---------------------------
12878 : || <long line> ||
         : ||24||
---------------------------
Now to find out how these odd control characters got into my data. But that is a different story.
Thanks much. Eric