in reply to Re: Add value from one array element into another of same ID
in thread Add value from one array element into another of same ID

This worked for me, just trying to get rid of the warnings at these line:

#Use of uninitialized value in length... for my $d (grep ! length $_->{Name}, @data) { ...
and here:
#Use of uninitialized value in length... push @new, $d if length $d->{Name} && ! exists $used{ $d->{Name} };

Replies are listed 'Best First'.
Re^3: Add value from one array element into another of same ID
by choroba (Cardinal) on May 27, 2021 at 18:34 UTC
    What version of Perl are you running? length undef should return undef without warnings since 5.012 (April 2010), if I remember correctly.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
      v5.10.1
        push @new, $d if defined $d->{Name} && length $d->{Name} && ! exists $used{ $d-> +{Name} };