< ^ >

Writing Excel as a Tab delimited file


    #!/usr/bin/perl -w

    use strict;

    my $data =  [
                    ['Area',    'Sales'      ],
                    ['East',    '150'        ],
                    ['West',    '100'        ],
                    ['Total',   '=SUM(B2:B3)'],
                ];

    open TAB, ">new_tab.txt" or die "Couldn't open file. $!\n";

    for my $aref (@$data) {
        my $data = join "\t" , @$aref;

        print TAB $data, "\n";
    }

    __END__