John Krahn wrote:
> Debbie Cooper wrote:
> > my @empty = ();
> > my @headings = ();
>
> Aggregate variables created with my() are empty by default so assigning an
> empty list to them is redundant.
>
I hope I am not opening a can of worms by getting into a style
disucssion, and I will preface t
needed.
I'm liking this Perl stuff more and more.
Thanks,
Debbie
-Original Message-
From: John W. Krahn [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 30, 2004 4:40 PM
To: Perl Beginners
Subject: Re: Search Tab-delimited file for Null fields
Debbie Cooper wrote:
> Thanks to ev
Debbie Cooper wrote:
Thanks to everyone for their help on this problem. I finally ended up using
the following:
#!perl
use warnings;
use strict;
my @empty = ();
my @headings = ();
Aggregate variables created with my() are empty by default so assigning an
empty list to them is redundant.
my $sum
Jonathan Paton wrote:
Dear All,
Hello,
Given the requirement that we are looking for unused columns, as soon
as we have seen all columns we can exit. I would do:
my %look_for;
my @header = split /\t/, ;
You don't chomp the input here which may foul up your output at the end.
for my $column (0 ..
DEX "\n";
I do get a print of the empty indexes but not a real useful one. What am I
doing wrong?
Thanks,
Debbie
-Original Message-
From: Chap Harrison [mailto:[EMAIL PROTECTED]
Sent: Monday, November 29, 2004 11:48 PM
To: Debbie Cooper
Cc: [EMAIL PROTECTED]
Subject: Re: Search
Dear All,
Given the requirement that we are looking for unused columns, as soon
as we have seen all columns we can exit. I would do:
my %look_for;
my @header = split /\t/, ;
for my $column (0 .. $#header - 1) {
$look_for{$column} = undef;
}
while () {
chomp;
my @data = split /\t/;
Gunnar Hjalmarsson wrote:
Debbie Cooper wrote:
I'm trying to read through a tab-delimited text file with the first
row containing headers. I want to print out any field/column name
where the entire field is null (meaning there is no value for that
field for any record in the file).
I'm thinking
Debbie Cooper wrote:
I'm pretty new to Perl but with the help of this list I've been able to come
up with a few helpful scripts. This time I'm trying to read through a
tab-delimited text file with the first row containing headers. I want to
print out any field/column name where the entire field i
[EMAIL PROTECTED] (Debbie Cooper) writes:
> I'm pretty new to Perl but with the help of this list I've been able to come
> up with a few helpful scripts. This time I'm trying to read through a
> tab-delimited text file with the first row containing headers. I want to
> print out any field/column
This time I'm trying to read through a
tab-delimited text file with the first row containing headers. I want
to
print out any field/column name where the entire field is null (meaning
there is no value for that field for any record in the file).
[snip]
I'm thinking that if I read each column int
Debbie Cooper wrote:
I'm trying to read through a tab-delimited text file with the first
row containing headers. I want to print out any field/column name
where the entire field is null (meaning there is no value for that
field for any record in the file).
I'm thinking that if I read each column
11 matches
Mail list logo