in reply to output to excel

The easiest thing (in my opinion) is to use a comma-separated-values format, and import into Excel.

open INPUT, "<./input.txt"; # assuming that's your input open OUTPUT, ">./output.csv"; # comma-separated-values output print OUTPUT "First column heading,Second column heading,Third column +heading\n"; while (<INPUT>) { my $first = s/(\d+)\.+//; my @others = split /\s\+/; print OUTPUT join(',' ($first, @others)).$/; }

Replies are listed 'Best First'.
Re^2: output to excel
by cjb (Friar) on Aug 04, 2011 at 12:34 UTC
    If you're going to take this approach, you'll probably be better of looking at Text::CSV unless you can be 100% sure that your input will never contain any commas.