i made it so i reply to myself:
On Tue, Dec 09, 2014 at 08:03:22PM +0100, Marc Chantreux wrote:
> which is almost perfect, but i don't know how to say to perl6 something
> like: I want a nested datastructure so please don't .list.item.
use [] to surround the array
my %posts = (ls "posts/*/index").map({
$_.subst(/index$/,"") => [ .IO.lines.map: {
my %h = < date file title >
Z .split(/<[\ \t]>+/,3);
{%h}
}]
}).sort: *.key;
> I guess when i would have fixed my code, i would be able to run
> something like:
>
> %posts.kv.map: -> $k, $v {
> say $k;
> $v.map: .<title>.ident(4).say
> }
use .pairs, not .kv:
%posts.pairs.map: { .say for .key, .value.map: {.<title>.indent(4)} }
regards
--
Marc Chantreux (eiro on github and freenode)
http://eiro.github.com/
http://eiro.github.com/atom.xml
"Don't believe everything you read on the Internet"
-- Abraham Lincoln