In article <> ,
Domenico Discepola <> wrote:
: [...]
: Example Excel file row:
: col A's value=<empty>
: col B's value = "1"
: col C's value = "2"
: <end of row>
:
: When you use Win32::OLE to "tell" Excel to save this as a TSV file (using
: the SaveAs method), a hex-dump of the resultant TSV file reveals row1 as:
: /^\t12$/ (using regex notation). In other words, I lose the existence of
: col A (which I need).
How have you lost column A? Consider the example below:
C:\Temp>type try
#! perl
use warnings;
use strict;
use Data:

umper;
my $data = "\t12";
my @fields = split /\t/, $data;
print Dumper \@fields;
C:\Temp>perl try
$VAR1 = [
'',
'12'
];
Are you sure there wasn't a TAB between the 1 and the 2? Even so,
you're still happy; note that the first element of @fields is empty:
#! perl
use warnings;
use strict;
use Data:

umper;
my $data = "\t1\t2";
my @fields = split /\t/, $data;
print Dumper \@fields;
C:\Temp>perl try
$VAR1 = [
'',
'1',
'2'
];
How were you trying to extract the fields in your TSV file?
Technical side note: what you're calling tab-delimited is really
tab-separated. Using [TAB] to make things stand out, a tab-delimited
record would look like
[TAB]field_1[TAB]field_2[TAB]...[TAB]field_n[TAB]
Tab-*separated*, however, would look like
field_1[TAB]field_2[TAB]...[TAB]field_n
Hope this helps,
Greg
--
It remains true today as it did in fascist Italy, socialist Germany, New
Deal America, and socialist Russia: freedom has no greater opponents than
those who despise and demonize commercial society.
-- Lew Rockwell