- or download this
my $process_file_name = shift @ARGV; - or download this
# file name for corrected data
my $clean_file_name = "$processfilename.clean";
...
# report the number of lines read, and written
my $raw_file_length = 0;
my $clean_file_length = 0;
- or download this
&ProcessFile; - or download this
my($raw_file_length, $clean_file_length) =
process_file(
$process_file_name, $clean_file_name, $correct_start_char,
$correct_start_length, $correct_clean_length, $typed_length);
- or download this
my @args = (
$ARGV[0], # file to process
...
my($raw_file_length, $clean_file_length) = process_file( @args );
- or download this
print "$raw_file_length lines read from $args[0]\n";
print "$clean_file_length lines written to $args[1]\n";
print "\a";
exit(0);
- or download this
chomp $data;
chop $data;
$data = reverse ($data);
chop $data;
$data = reverse ($data);
- or download this
$data = substr($data, 1, -2); - or download this
chomp $data;
$datalengthtrack--;
chop $data;
...
}
$data = reverse ($data);
print CLEANFILE "$data\n";
- or download this
print CLEANFILE substr( substr($data, 0, -2), -$correct_clean_length), "\n"; - or download this
if ( $start_char == $correct_start_char ) {
next if $data_length != $correct_start_length;
if ( $data_length == $correct_start_length ) {
...
$clean_file_length++;
}
}
- or download this
my ( $file_name, $clean_file_name, $correct_start_char,
$correct_start_length, $correct_clean_length, $typed_length) =
+ @_;
- or download this
open RAW, $file_name or die "Cannot open $file_name: $!";
open CLEAN, ">$clean_file_name" or die "Cannot open $clean_file_name:
+$!";
- or download this
my($raw_lines, $clean_lines); - or download this
my($raw_file_length, $clean_file_length) - or download this
#!/usr/bin/perl
####################################################
# InvClean.pl : Raw Scanned File Processing program
...
}
__END__