http://qs321.pair.com?node_id=581676


in reply to Re: Why "use of uninitialized value" warning comes?
in thread Why "use of uninitialized value" warning comes?

Or even
for my $need (grep { /^sanj/ } @need) { $array1[$incr1++] = $need; } #although maybe in that case you would just do the more readable for my $need (@need) { if($need =~ /^sanj/) { $array1[$incr1++] = $need; } }
And to make that warning go away in places you really need the eq there is if(defined $foo && $foo eq 'bar')

                - Ant
                - Some of my best work - (1 2 3)