But something is getting through. I'd like to find out what. I think it might be a tab character, but I am not sure. So I thought I'd parse through my file and see if I can find it. .... ok, this is where I need help. :) Am I on the right track?SELECT ... SUBSTR ( REPLACE ( REPLACE ( memo_system_txt, CHR(10), '' ), CHR(13), +'' ), 1, 255 ) AS memo_sys_txt, ...
Getting:#!/usr/bin/perl use strict; use warnings; open F, "memo.txt"; open X, ">memo.txt_error"; my $row; my $line; $row = 0; while (<F>) { chomp; $line = $_; $row++; # Look for any lines of the wrong length # if ( length $line != 2340 ) # { # printf X "%u : ||%s||\n", $row, $line; # } # Find any control characters if ( $line =~ /[[:cntrl]]/ ) { my $c = $1; printf X "%u : ||%s||\n", $row, $line; printf X "\t : ||%s||\n", ORD($c); print X "---------------------------"; } } close X; close F;
printf() on unopened filehandle X at ./a2.pl line 20, <F> line 150. Can't call method "ORD" without a package or object reference at ./a2.pl line 21, <F> line 150What did I get wrong? I'd like to find the numeric value (i.e. ORD(tab) is 9) and where in the line the character is located. Thanks for your help. Eric
Edit: g0n - replaced pre tags with code tags
In reply to Searching for control characters by ericdp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |