The zip operator in this case takes two sequences and interleaves them
into a single sequence. It might be useful if you have handy or can
generate a list of keys and a list of values you want to put together
in pairs using => to create a hash table.
Your explicit approach makes sense for
On Wednesday, March 01, 2017 01:01 PM, Todd Chester wrote:
Hi All,
And it even gets more interesting.
It even works with Associative Arrays (Hashes), which I adore!
Interesting how associative arrays don't print in order that they
were entered into the array.
#!/usr/bin/perl6
my @x = (
Hi All,
And it even gets more interesting.
It even works with Associative Arrays (Hashes), which I adore!
Interesting how associative arrays don't print in order that they
were entered into the array.
#!/usr/bin/perl6
my @x = ( "a", "b", "c", "d" );
print "loop of \@x\n";
for @x.kv ->
On 02/28/2017 01:30 PM, yary wrote:
Maybe using placeholder variables was a bit too much (those variables
with the ^ twigil)
for @a.kv -> $k, $v { say "Value $v has index $k" }
Value g has index 0
Value h has index 1
Value i has index 2
Value j has index 3
Value k has index 4
Hi Yary,
On 02/28/2017 01:20 PM, ToddAndMargo wrote:
Hi All,
There are times when I want to know th4e index of an array
when I am in a "for @array" loop. I can do it with a
variable outside the for loop and increment it, but
I would line to know know if there is a way to incorporate
it in the loop
On Tue, Feb 28, 2017 at 01:20:47PM -0800, ToddAndMargo wrote:
Hi All,
There are times when I want to know th4e index of an array
when I am in a "for @array" loop. I can do it with a
variable outside the for loop and increment it, but
I would line to know know if there is a way to incorporate
> On 28 Feb 2017, at 22:28, Theo van den Heuvel wrote:
> Elizabeth Mattijsen schreef op 2017-02-28 20:29:
>> That was the consensus on the #perl6-dev channel:
>> https://irclog.perlgeek.de/perl6-dev/2017-02-28#i_14181744
>> Liz
>
> I wasn't aware of this. Thanks
You’re
Maybe using placeholder variables was a bit too much (those variables with
the ^ twigil)
> for @a.kv -> $k, $v { say "Value $v has index $k" }
Value g has index 0
Value h has index 1
Value i has index 2
Value j has index 3
Value k has index 4
Elizabeth Mattijsen schreef op 2017-02-28 20:29:
That was the consensus on the #perl6-dev channel:
https://irclog.perlgeek.de/perl6-dev/2017-02-28#i_14181744
Liz
I wasn't aware of this. Thanks
--
Theo van den Heuvel
> my @a = ( 'g' .. 'k' )
[g h i j k]
> @a.kv
(0 g 1 h 2 i 3 j 4 k)
> for @a.kv { say "Value $^v has index $^i" }
Value g has index 0
Value h has index 1
Value i has index 2
Value j has index 3
Value k has index 4
> On 28 Feb 2017, at 22:20, ToddAndMargo wrote:
>
> Hi All,
>
> There are times when I want to know th4e index of an array
> when I am in a "for @array" loop. I can do it with a
> variable outside the for loop and increment it, but
> I would line to know know if there is
I think the canonical Perl 6 answer is:
for @array.kv -> $index, $value { do something }
Pm
On Tue, Feb 28, 2017 at 01:20:47PM -0800, ToddAndMargo wrote:
> Hi All,
>
> There are times when I want to know th4e index of an array
> when I am in a "for @array" loop. I can do it with a
>
Hi All,
Anyone know how to do an attachment with Net::SMTP.
I need to attach a tar ball.
I see this is Thunderbird's message source, but ..
--0__=0ABB0A53DFD693F18f9e8a93df938690918c0ABB0A53DFD693F1
Content-type: image/gif;
name="pic15602.gif"
Content-Disposition: attachment;
On 02/28/2017 12:53 PM, Brandon Allbery wrote:
On Tue, Feb 28, 2017 at 3:46 PM, ToddAndMargo > wrote:
On 02/28/2017 04:11 AM, yary wrote:
On Tue, Feb 28, 2017 at 12:53 AM, ToddAndMargo
On 02/28/2017 04:11 AM, yary wrote:
On Tue, Feb 28, 2017 at 12:53 AM, ToddAndMargo > wrote:
sub PrintRed ( $Str ) { print color('bold'), color('red'),
"$Str", color('reset'); }
sub PrintGreen ( $Str ) { print color('bold'),
That was the consensus on the #perl6-dev channel:
https://irclog.perlgeek.de/perl6-dev/2017-02-28#i_14181744
Liz
> On 28 Feb 2017, at 15:24, Theo van den Heuvel wrote:
>
> Hi Will,
>
> I reinstalled without rakudobrew. It helped. I will probably never
On Tue, Feb 28, 2017 at 9:24 AM, Theo van den Heuvel
wrote:
> I reinstalled without rakudobrew. It helped. I will probably never know
> what I did wrong with rakudobrew (possible traces of an older install).
One thing it does wrong is it doesn't fetch tags for its repos,
Hi Will,
I reinstalled without rakudobrew. It helped. I will probably never know
what I did wrong with rakudobrew (possible traces of an older install).
thanks,
Theo
Will Coleda schreef op 2017-02-28 14:37:
FYI, rakudobrew is not recommend for users.
You could try "rakudobrew rehash",
FYI, rakudobrew is not recommend for users.
You could try "rakudobrew rehash", though I'm not sure if that will
help in this case.
On Tue, Feb 28, 2017 at 7:55 AM, Theo van den Heuvel
wrote:
> hi everyone,
>
> last week I used rakudobrew to update my Perl6 installation on
hi everyone,
last week I used rakudobrew to update my Perl6 installation on Ubuntu.
This is Rakudo version 2017.02-106-gdd4dfb1 built on MoarVM version
2017.02-7-g3d85900
implementing Perl 6.c.
Now, whenever I try perl6-debug-m I get
Cannot find method 'setlang' on object of type
20 matches
Mail list logo