in reply to 1 != split /a/, '' ?
push @keys, [ split /\./, $key_string, -1 ]; $keys[-1] = [ q() ] unless @{ $keys[-1] };
I'm not sure it's more elegant than yours (elegance is in the eye of the beholder). In your solution, you can use just '.', the A is not needed.
Note that I used a different names for the array and scalar.
I don't understand the preamble. Do you need Data::Diver?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: 1 != split /a/, '' ?
by ikegami (Patriarch) on Nov 03, 2015 at 13:27 UTC | |
by Anonymous Monk on Nov 04, 2015 at 19:30 UTC | |
by Happy-the-monk (Canon) on Nov 04, 2015 at 22:12 UTC |