in reply to split/map weirdness: empty strings vs undef
Try this:
map { print defined($_) ? "def\n" : "undef\n" } split(/|/, "2|3|||||");
Bug! That should be split(/\|/, ...) See below.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: split/map weirdness: empty strings vs undef
by blakem (Monsignor) on Oct 04, 2002 at 20:05 UTC | |
by dws (Chancellor) on Oct 04, 2002 at 20:09 UTC | |
by sauoq (Abbot) on Oct 04, 2002 at 20:24 UTC | |
by dws (Chancellor) on Oct 04, 2002 at 21:39 UTC | |
by sauoq (Abbot) on Oct 04, 2002 at 21:56 UTC | |
|
Re: Re: split/map weirdness: empty strings vs undef
by sauoq (Abbot) on Oct 04, 2002 at 20:12 UTC |