jeanluca has asked for the wisdom of the Perl Monks concerning the following question:
This works great. But now I first delete an element from @a. The result is that I endup with and hash with one key == undef. How do I change this expression so undef values are ignored by map ??%b = map{ $_, 1 } @a ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: from array to hash
by ikegami (Patriarch) on Mar 09, 2006 at 15:16 UTC | |
by jeanluca (Deacon) on Mar 09, 2006 at 15:44 UTC | |
by friedo (Prior) on Mar 09, 2006 at 15:48 UTC | |
by ikegami (Patriarch) on Mar 09, 2006 at 17:20 UTC | |
|
Re: from array to hash
by radiantmatrix (Parson) on Mar 09, 2006 at 16:04 UTC | |
|
Re: from array to hash
by linux454 (Pilgrim) on Mar 09, 2006 at 17:16 UTC |