in reply to Re: create hash with map
in thread create hash with map
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: create hash with map
by mwah (Hermit) on Sep 24, 2007 at 15:49 UTC | |
by ikegami (Patriarch) on Sep 24, 2007 at 15:55 UTC | |
by mwah (Hermit) on Sep 24, 2007 at 16:10 UTC | |
by ikegami (Patriarch) on Sep 24, 2007 at 16:19 UTC | |
|