02.09.2015, 14:49, "Elizabeth Mattijsen" <l...@dijkmat.nl>: >> I think this is covered somewhere in RFC; perl6 repeatedly overwrites >> END{} block where last one references last %d definition (say %d.WHICH). >> perl5 on the other hand stays with first END{} block (say \%d). > > A much shorter way, using Perl 6 features: > > $ seq 3 | perl6 -e ‘lines.Set.keys.say’ > > lines() reads lazily from STDIN and chomps them > Set is a coercer that turns the input into a Set > then take the keys of the set and show them
Tnx, I hope there will be perl6 Cookbook available on Amazon with more of such examples.