I've several of those in the file that have only keys but no values.
This
could be problematic. Is there a way, I can flag these while filling the
hash up?

Thanks,
perdeep

-----Original Message-----

> use strict;
> use warnings;
> 
>   my %defln = ();
> 
>   while (my $line = <FILE>) {
>        chop($line);
>        if ($line =~ /^$/) {
>           next;
>        }
>        else {
>           my @words = split(/\t+/, $line);

                ## Only push lines that have STUFF\tMORESTUFF
                push(@{ $defln{$words[0]} }, $line) if (defined
$words[1]);

>        }
>    }
> 

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to