Re: POD: linking to a module

2019-01-11 Thread JJ Merelo
Actually, we had that functionality, but it was recently eliminated by Richard Hainsworth since, as a matter of fact, there are no specs on what to actually do with them. And it was eliminated for several reasons, one of which is that MetaCPAN does not display Pod6, but the main reason is that

Re: I need hash string help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 6:51 PM, ToddAndMargo via perl6-users wrote: On 1/11/19 6:49 PM, Brad Gilbert wrote: $a is short for $a{'a','b'} This also happens in string literals my $a = { a => 1, b => 2 }; say "$a"; # 1 2 say "$a{'a','b'}"; # 1 2 A simple way to stop this is to add a backslash

Re: I need hash string help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 6:49 PM, Brad Gilbert wrote: $a is short for $a{'a','b'} This also happens in string literals my $a = { a => 1, b => 2 }; say "$a"; # 1 2 say "$a{'a','b'}"; # 1 2 A simple way to stop this is to add a backslash my $a = 'b' say "$a\"; # b You can also call

Re: I need hash string help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 6:35 PM, Bruce Gray wrote: On Jan 11, 2019, at 7:08 PM, ToddAndMargo via perl6-users wrote: Hi All, Now what am I doing wrong? I need to convert the value in a hash to a string: $ p6 'my $x = "acme"; my Str $y; my %Vendors = ( acme => ContactName => "Larry" ); $y= %Vendors;

Re: I need hash string help

2019-01-11 Thread Brad Gilbert
$a is short for $a{'a','b'} This also happens in string literals my $a = { a => 1, b => 2 }; say "$a"; # 1 2 say "$a{'a','b'}"; # 1 2 A simple way to stop this is to add a backslash my $a = 'b' say "$a\"; # b You can also call methods on variables in string literals, as

Re: I need hash string help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 6:23 PM, Tom Browder wrote: On Fri, Jan 11, 2019 at 20:15 ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: ... > $p6 'my $x = "acme"; my %Vendors = ( acme => { ContactName => "Larry", > AccountNo => 1234 } ); my Str $y = %Vendors{$x}.Str; say $y;' In my

Re: I need hash string help

2019-01-11 Thread Bruce Gray
> On Jan 11, 2019, at 7:08 PM, ToddAndMargo via perl6-users > wrote: > > Hi All, > > Now what am I doing wrong? I need to convert the value in a > hash to a string: > > $ p6 'my $x = "acme"; my Str $y; my %Vendors = ( acme => ContactName => > "Larry" ); $y= %Vendors; say $y;' > $ p6 'my

Re: I need hash string help

2019-01-11 Thread Tom Browder
On Fri, Jan 11, 2019 at 20:15 ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: ... > $p6 'my $x = "acme"; my %Vendors = ( acme => { ContactName => "Larry", > AccountNo => 1234 } ); my Str $y = %Vendors{$x}.Str; say $y;' In my experience, it helps often to avoid using strict typing

Re: I need hash string help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 5:59 PM, Tom Browder wrote: On Fri, Jan 11, 2019 at 19:09 ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: Now what am I doing wrong?  I need to convert the value in a hash to a string: $ p6 'my $x = "acme"; my Str $y; my %Vendors = ( acme =>

Re: I need hash string help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 5:08 PM, ToddAndMargo via perl6-users wrote: Hi All, Now what am I doing wrong?  I need to convert the value in a hash to a string: $ p6 'my $x = "acme"; my Str $y; my %Vendors = ( acme => ContactName => "Larry" ); $y= %Vendors; say $y;' Type check failed in assignment to $y;

Re: I need hash string help

2019-01-11 Thread Tom Browder
On Fri, Jan 11, 2019 at 19:09 ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > Now what am I doing wrong? I need to convert the value in a > hash to a string: > > $ p6 'my $x = "acme"; my Str $y; my %Vendors = ( acme => ContactName => > "Larry" ); Try eliminating “acme =>” for a

POD: linking to a module

2019-01-11 Thread Vadim Belman
Hello, How do I properly write a link to a module in a POD documentation? Actually, the question is even more complex as it might be both a module and a .pod. The documentation (https://docs.perl6.org/language/pod) isn't clear on this subject. When it comes to `L<>` docs are mostly focused on

I need hash string help

2019-01-11 Thread ToddAndMargo via perl6-users
Hi All, Now what am I doing wrong? I need to convert the value in a hash to a string: $ p6 'my $x = "acme"; my Str $y; my %Vendors = ( acme => ContactName => "Larry" ); $y= %Vendors; say $y;' Type check failed in assignment to $y; expected Str but got Any (Any) in block at -e line 1 $

Re: subnet calculator

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 1:56 PM, Bruce Gray wrote: On Jan 11, 2019, at 2:07 PM, ToddAndMargo via perl6-users wrote: Hi All, Anyone know if someone has written a program like this in Perl that will run locally and not require the Internet? http://www.subnet-calculator.com/ Many thanks, -T I have

Re: subnet calculator

2019-01-11 Thread ToddAndMargo via perl6-users
On Fri, Jan 11, 2019 at 3:08 PM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: Hi All, Anyone know if someone has written a program like this in Perl that will run locally and not require the Internet? http://www.subnet-calculator.com/ Many thanks,

Re: subnet calculator

2019-01-11 Thread Bruce Gray
> On Jan 11, 2019, at 2:07 PM, ToddAndMargo via perl6-users > wrote: > > Hi All, > > Anyone know if someone has written a program like this > in Perl that will run locally and not require the Internet? > > http://www.subnet-calculator.com/ > > > Many thanks, > -T I have not used it, but

Re: subnet calculator

2019-01-11 Thread Paul Procacci
http://jodies.de/ipcalc Download link at bottom of page. On Fri, Jan 11, 2019 at 3:08 PM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > Hi All, > > Anyone know if someone has written a program like this > in Perl that will run locally and not require the Internet? > >

subnet calculator

2019-01-11 Thread ToddAndMargo via perl6-users
Hi All, Anyone know if someone has written a program like this in Perl that will run locally and not require the Internet? http://www.subnet-calculator.com/ Many thanks, -T

Re: I need hash inside a hash help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 11:59 AM, Bruce Gray wrote: That may work, but is bad practice. no fooling! look like hell too

Re: I need hash inside a hash help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 11:50 AM, ToddAndMargo via perl6-users wrote: On 1/11/19 11:43 AM, ToddAndMargo via perl6-users wrote: On 1/11/19 11:39 AM, ToddAndMargo via perl6-users wrote: On 1/11/19 11:33 AM, JJ Merelo wrote: I think you want $x, not $Ace. Cheers Yup.  I am on fire today!  :'( Still can't

Re: I need hash inside a hash help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 11:45 AM, Bruce Gray wrote: Short answer: use `%hash{$var}`, not `%hash<$var>`. When they are not in position to be less-than and greater-than comparison operators, the pair of left and right angle brackets are a circumfix operator that work like Perl 5’s “quote word” op: `qw()`.

Re: I need hash inside a hash help

2019-01-11 Thread Bruce Gray
That may work, but is bad practice. Instead of: %Vendors<< $x >> , please use: %Vendors{$x} The relation of `<<…>>` is to `<…>` as double-quotes are to single-quotes; doubling up changes from non-interpolating to interpolating. To say `%Vendors<< $x >>` is to take the shortcut

Re: I need hash inside a hash help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 11:50 AM, Bruce Gray wrote: 'my $x = "Ace"; my %Vendors = ( acme => { ContactName => "Larry", AccountNo => 1234 }, Ace => { ContactName => "Mo", AccountNo => "A102" } ); say %Vendors{$x} ~ "\t" ~ %Vendors{$x};’ Hi Bruce, Sweet! Thank you! $ p6 'my $x = "Ace"; my %Vendors = (

Re: I need hash inside a hash help

2019-01-11 Thread Bruce Gray
> On Jan 11, 2019, at 1:39 PM, ToddAndMargo via perl6-users > wrote: > > On 1/11/19 11:33 AM, JJ Merelo wrote: >> I think you want $x, not $Ace. >> Cheers > > Yup. I am on fire today! :'( > > Still can't get it figured out. :'( :'( > > $ p6 'my $x="Ace"; my %Vendors=("acme" => {

Re: I need hash inside a hash help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 11:43 AM, ToddAndMargo via perl6-users wrote: On 1/11/19 11:39 AM, ToddAndMargo via perl6-users wrote: On 1/11/19 11:33 AM, JJ Merelo wrote: I think you want $x, not $Ace. Cheers Yup.  I am on fire today!  :'( Still can't get it figured out.  :'(  :'( $ p6 'my $x="Ace"; my

Re: I need hash inside a hash help

2019-01-11 Thread Bruce Gray
Short answer: use `%hash{$var}`, not `%hash<$var>`. When they are not in position to be less-than and greater-than comparison operators, the pair of left and right angle brackets are a circumfix operator that work like Perl 5’s “quote word” op: `qw()`. In Perl 6, `<>` are used a lot, including

Re: I need hash inside a hash help

2019-01-11 Thread JJ Merelo
You don't need to quote "%Vendors<{"$x"}>"By doing so, you're closing the quotes right behind { Cheers El vie., 11 ene. 2019 a las 20:39, ToddAndMargo via perl6-users (< perl6-users@perl.org>) escribió: > On 1/11/19 11:33 AM, JJ Merelo wrote: > > I think you want $x, not $Ace. > > > > Cheers >

Re: I need hash inside a hash help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 11:39 AM, ToddAndMargo via perl6-users wrote: On 1/11/19 11:33 AM, JJ Merelo wrote: I think you want $x, not $Ace. Cheers Yup.  I am on fire today!  :'( Still can't get it figured out.  :'(  :'( $ p6 'my $x="Ace"; my %Vendors=("acme" => { "ContactName" => "Larry", "AccountNo"

Re: I need hash inside a hash help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 11:33 AM, JJ Merelo wrote: I think you want $x, not $Ace. Cheers Yup. I am on fire today! :'( Still can't get it figured out. :'( :'( $ p6 'my $x="Ace"; my %Vendors=("acme" => { "ContactName" => "Larry", "AccountNo" => 1234 }, "Ace" => { "ContactName" => "Mo", "AccountNo" =>

Re: I need hash inside a hash help

2019-01-11 Thread JJ Merelo
I think you want $x, not $Ace. Cheers El vie., 11 ene. 2019 a las 20:26, ToddAndMargo via perl6-users (< perl6-users@perl.org>) escribió: > On 1/11/19 11:16 AM, Bruce Gray wrote: > > > > > >> On Jan 11, 2019, at 12:41 PM, ToddAndMargo via perl6-users < > perl6-users@perl.org> wrote: > >> > >>

Re: I need hash inside a hash help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 11:16 AM, Bruce Gray wrote: On Jan 11, 2019, at 12:41 PM, ToddAndMargo via perl6-users wrote: Hi All, How do I do a hash inside a hash? So far I have: $ p6 'my %Vendors=("acme" => ( "ContactName" => "Larry, "AccountNo" => 1234 ) ); say %Vendors;' ===SORRY!=== Error while

Re: I need hash inside a hash help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 11:12 AM, ToddAndMargo via perl6-users wrote: On 1/11/19 11:09 AM, Timo Paulssen wrote: Hi Todd, the error you're getting comes from a closing quotation mark missing after "Larry You will also need to give perl6 some hint that you want the list of pairs to actually become a hash.

Re: I need hash inside a hash help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 11:07 AM, JJ Merelo wrote: What would you say is the error, according to where the arrow points to? Maybe some unclosed double quotes? El vie., 11 ene. 2019 a las 19:57, ToddAndMargo via perl6-users (mailto:perl6-users@perl.org>>) escribió: Hi All, How do I do a hash

Re: I need hash inside a hash help

2019-01-11 Thread Bruce Gray
> On Jan 11, 2019, at 12:41 PM, ToddAndMargo via perl6-users > wrote: > > Hi All, > > How do I do a hash inside a hash? > > So far I have: > > $ p6 'my %Vendors=("acme" => ( "ContactName" => "Larry, "AccountNo" => 1234 ) > ); say %Vendors;' > ===SORRY!=== Error while compiling -e > > >

Re: I need hash inside a hash help

2019-01-11 Thread ToddAndMargo via perl6-users
On 1/11/19 11:09 AM, Timo Paulssen wrote: Hi Todd, the error you're getting comes from a closing quotation mark missing after "Larry You will also need to give perl6 some hint that you want the list of pairs to actually become a hash. To do that, I would recommend just putting a % in front of

Re: I need hash inside a hash help

2019-01-11 Thread Timo Paulssen
Hi Todd, the error you're getting comes from a closing quotation mark missing after "Larry You will also need to give perl6 some hint that you want the list of pairs to actually become a hash. To do that, I would recommend just putting a % in front of the () The working code looks like this:

Re: I need hash inside a hash help

2019-01-11 Thread JJ Merelo
What would you say is the error, according to where the arrow points to? Maybe some unclosed double quotes? El vie., 11 ene. 2019 a las 19:57, ToddAndMargo via perl6-users (< perl6-users@perl.org>) escribió: > Hi All, > > How do I do a hash inside a hash? > > So far I have: > > $ p6 'my

Re: How do I trap a crash?

2019-01-11 Thread ToddAndMargo via perl6-users
>> Hi All, >> >> I would like to do a Send Notify when a program of mine >> crashes. >> >> How do I trap a crash? >> >> Is there a way to see some of the local variables in the >> sub that crashes with the trap? >> >> >> Many thanks, >> -T On 1/11/19 10:56 AM, Elizabeth Mattijsen wrote: Perhaps

Re: How do I trap a crash?

2019-01-11 Thread Elizabeth Mattijsen
Perhaps https://docs.perl6.org/language/exceptions#Catching_exceptions could be enlightening? > On 11 Jan 2019, at 18:54, ToddAndMargo via perl6-users > wrote: > > Hi All, > > I would like to do a Send Notify when a program of mine > crashes. > > How do I trap a crash? > > Is there a way

I need hash inside a hash help

2019-01-11 Thread ToddAndMargo via perl6-users
Hi All, How do I do a hash inside a hash? So far I have: $ p6 'my %Vendors=("acme" => ( "ContactName" => "Larry, "AccountNo" => 1234 ) ); say %Vendors;' ===SORRY!=== Error while compiling -e I want to be able to have both a Contact Name and and AccountNo associated with each key in

How do I trap a crash?

2019-01-11 Thread ToddAndMargo via perl6-users
Hi All, I would like to do a Send Notify when a program of mine crashes. How do I trap a crash? Is there a way to see some of the local variables in the sub that crashes with the trap? Many thanks, -T -- ~~ Computers are like air conditioners. They