in reply to weird files


You could use the -00 command line switch, see -0 in perlrun, to read the file in paragraph mode:
#!/usr/bin/perl -w -00 use strict; open TABFILE, "tabfile" or die "Error message here: $!"; my @array = <TABFILE>; print scalar @array; # prints 6 for the above file

You can get the same effect from within a program by setting $/ = "":

#!/usr/bin/perl -w use strict; open TABFILE, "tabfile" or die "Error message here: $!"; { local $/ = ""; my @array = <TABFILE>; } print scalar @array;

See $/ in perlvar for an explanation of this.

--
John.