That gives
Use of uninitialized value in split
Fix:
%cp = map{ (split /:/)[0], [split /,/, ((split /:/), '')[1] ] } @ex;
Note that using a string as the first argument of split is misleading, since it expects a regexp. You might as well provide a regexp directly.
In reply to Re^2: create hash with map
by ikegami
in thread create hash with map
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |