in reply to Re: print the values
in thread print the values

Thanks but the $names prints the names which exists in the %names_hash.
How to print the values which doesnot exists in the %names_hash

Replies are listed 'Best First'.
Re^3: print the values
by chromatic (Archbishop) on Nov 05, 2009 at 09:49 UTC

    Don't push them into @names if they already exist in %names_hash; add a conditional to the line with the push.

Re^3: print the values
by grizzley (Chaplain) on Nov 05, 2009 at 12:12 UTC

    Change skip condition to the opposite, from

    next if ! exists $names_hash{$names};

    to

    next if exists $names_hash{$names};