#!/usr/bin/perl
use strict;
my $inFile = "TST5.NDM.SB.IOWSFLAT.STMTS.MRDF.TEST";
my $outFile = "$inFile.out";
my $buff;
open(INFP, $inFile);
open(OUTFP, ">$outFile");
binmode(INFP);
binmode(OUTFP);
my $cnt = 1;
my $matchCnt = 0;
while (read(INFP, $buff, 128)) {
print OUTFP $buff;
my $target = "\x0D";
if ($buff =~ /$target/) {
print $buff;
print "\n found \$target on 'line' $cnt, ";
print "'" . ord($&) . "', '\x$&'\n";
++$matchCnt;
}
++$cnt;
}
print "found target $matchCnt times\n";
close (INFP);
close (OUTFP);
In reply to Re^2: Can't find \x0D
by thornton102
in thread Can't find \x0D
by thornton102
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |