in reply to Re: Import comma delimited file into an array
in thread Import comma delimited file into an array
use File::Glob; my @files = glob("C:/Wire/*.csv"); open OUTPUT, ">C:/Wire/WO.txt"; foreach my $x (@files) { open FILE, $x; while (<FILE>) { my @row = split(/,/, $_); next if (substr($_,0,5) =~ /Debit/) ; print "{1100}02P N" . $row[6] . "{1110}" . "{1120}" . "{1510}" . " +{1520}" . "{3320}" . "{3400}" . "{3600}" . "{4320}" . "{5000}" . "\n"; print OUTPUT "{1100}02P N" . $row[6] . "{1110}" . "{1120}" . "{151 +0}" . "{1520}" . "{3320}" . "{3400}" . "{3600}" . "{4320}" . "{5000}" . "\n" } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Import comma delimited file into an array
by toolic (Bishop) on Nov 19, 2008 at 00:44 UTC | |
by massa (Hermit) on Nov 19, 2008 at 10:37 UTC | |
by toolic (Bishop) on Nov 19, 2008 at 14:44 UTC | |
by Anonymous Monk on Nov 19, 2008 at 14:33 UTC | |
by drodinthe559 (Monk) on Nov 19, 2008 at 23:05 UTC |