in reply to Finding Empty Columns
I am using the following code to try and determine if a column has any data other then 0
Ill assume you mean 0 or empty
use strict; use warnings; use Data::Dumper; my @rows; my @empty; while (<>) { chomp; my @row=split /;/; push @rows,\@row; $empty[$_]||=$row[$_] for 0..$#row; } print "Empty columns:",join(", ",grep { $empty[$_] } 0..$#empty),"\n"; print Data::Dumper->Dump([\@rows],['*rows']);
HTH
---
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Finding Empty Columns
by Anonymous Monk on Feb 14, 2003 at 21:01 UTC | |
by demerphq (Chancellor) on Feb 14, 2003 at 21:32 UTC |