in reply to Re: Extract column of excel
in thread Extract column of excel
This code is working but the problem is that it does not take the entire column it truncates the column , if anyone can look why the code does not take the entire column . thanks#!/bin/perl -w use strict; #variables you can change to suit your needs my $column_separator = ","; my $column_number = "8"; $column_number--; my $file="Working_On.csv"; open(FILE,"<","$file"); my @lines=<FILE>; close FILE; foreach my $line (@lines){ my @columns = split(/$column_separator/,"$line"); print $columns[$column_number],"\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Extract column of excel
by hdb (Monsignor) on Jun 04, 2013 at 07:29 UTC | |
by MynameisAchint (Novice) on Jun 04, 2013 at 09:32 UTC | |
by hdb (Monsignor) on Jun 04, 2013 at 11:24 UTC |