in reply to how to identify a fixed width file
If any (or a sufficiently large portion of) those line counts represent a big percentage of the total line count, you could make a guess that the file was fixed width. Perhaps also giving a weighting on how many different line lengths are represented in the file, compared to how many you might expect given the file's length?my %line_count_by_length; while (<DATA>) { my $line_length = length($_); $line_count_by_length{$line_length}++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to identify a fixed width file
by ftumsh (Scribe) on May 14, 2008 at 15:48 UTC |