I am using the following code to try and determine if a column has any data other then 0
I know have a hash of row data, How can I determine if the entire column consists of zero data?#!/perl/bin/perl.exe -w use strict; my @array = (); my @row = (); my %hash = (); if ( @ARGV != 1 ) { print "\nUsage: <File Name> \n\n"; exit(0); } my $file = $ARGV[0]; open (FILE, $file) || die "ERROR: Unable to open $file :$!\n"; @array = <FILE>; my $size = @array; for (0..$size) { @row = (split /\;/, $array[$_]); $hash{$_} = \@row; foreach (@row) { print $_, "\n"; } @row = (); }
In reply to Finding Empty Columns by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |