Re: I need `dir` help

2018-05-10 Thread ToddAndMargo
On 05/10/2018 04:43 PM, Brandon Allbery wrote: On Thu, May 10, 2018 at 7:34 PM, ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: https://docs.perl6.org/routine/dir <https://docs.perl6.org/routine/dir> perl6 -e 'my $x=dir; say "$x";' Does ind

Re: I need `dir` help

2018-05-10 Thread ToddAndMargo
On 05/10/2018 04:49 PM, ToddAndMargo wrote: On 05/10/2018 04:43 PM, Brandon Allbery wrote: On Thu, May 10, 2018 at 7:34 PM, ToddAndMargo <mailto:toddandma...@zoho.com>> wrote:     https://docs.perl6.org/routine/dir <https://docs.perl6.org/routine/dir>     perl6 -e 

Re: I need `dir` help

2018-05-10 Thread ToddAndMargo
On 05/10/2018 04:52 PM, ToddAndMargo wrote: On 05/10/2018 04:49 PM, ToddAndMargo wrote: On 05/10/2018 04:43 PM, Brandon Allbery wrote: On Thu, May 10, 2018 at 7:34 PM, ToddAndMargo <mailto:toddandma...@zoho.com>> wrote:     https://docs.perl6.org/routine/dir <https://docs.perl6

Re: I need `dir` help

2018-05-10 Thread ToddAndMargo
On 05/10/2018 04:52 PM, Brandon Allbery wrote: The last line of my message, quoted above, is there for a reason. An IO::Path is not a Str. I understand now. Thank you!

Re: I need `dir` help

2018-05-10 Thread ToddAndMargo
On 05/10/2018 04:56 PM, Brandon Allbery wrote: I think you'll need to provide a better explanation of what you're trying to accomplish. I can think of lots of ways to do useful things with the output of dir(), but have no idea which one(s) you need. I wanted to loop through entries as an exerc

I need indir help

2018-05-10 Thread ToddAndMargo
Hi All, I am over on https://docs.perl6.org/routine/indir I can make heads of tails out of what is going on. I want to check is a file exists. $ perl6 -e 'say indir("./EchoTest");' ===SORRY!=== Error while compiling -e Calling indir(Str) will never work with any of these multi signatures:

Re: I need indir help

2018-05-10 Thread ToddAndMargo
On Thu, May 10, 2018 at 8:04 PM, ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: Hi All, I am over on https://docs.perl6.org/routine/indir <https://docs.perl6.org/routine/indir> I can make heads of tails out of what is going on. I want to check i

Re: I need `dir` help

2018-05-10 Thread ToddAndMargo
On 05/10/2018 05:42 PM, Brad Gilbert wrote: On Thu, May 10, 2018 at 7:02 PM, ToddAndMargo wrote: On 05/10/2018 04:56 PM, Brandon Allbery wrote: I think you'll need to provide a better explanation of what you're trying to accomplish. I can think of lots of ways to do useful thing

any better explanation of look ahead assertions

2018-05-10 Thread ToddAndMargo
Hi All, Looking at: https://docs.perl6.org/language/regexes#Lookahead_Assertions https://docs.perl6.org/language/regexes#Lookbehind_assertions I can't tell heads from tails. Does anyone know of a better reference/explanation for beginners? Many thanks, -T

Re: any better explanation of look ahead assertions

2018-05-10 Thread ToddAndMargo
On 05/10/2018 07:06 PM, Brad Gilbert wrote: You could read how they work in PCRE What is PCRE?

Re: any better explanation of look ahead assertions

2018-05-10 Thread ToddAndMargo
On 05/10/2018 07:12 PM, Brad Gilbert wrote: On Thu, May 10, 2018 at 9:09 PM, ToddAndMargo wrote: On 05/10/2018 07:06 PM, Brad Gilbert wrote: You could read how they work in PCRE What is PCRE? Perl Compatible Regular Expressions, Basically someone reimplemented the regular expression

need -c help

2018-05-10 Thread ToddAndMargo
Hi All, I am converting a YUGE program over from Perl 5 to Perl 6 (Perl 5's subs drive me INSANE). $ perl6 -c GetUpdates.pl6 ===SORRY!=== Error while compiling /home/linuxutil/CurlUtils.pm6 Variable '$TimeOut' is not declared. Did you mean '$Timeout'? at /home/linuxutil/CurlUtils.pm6:24 -->

Re: need -c help

2018-05-10 Thread ToddAndMargo
On 05/10/2018 07:37 PM, ToddAndMargo wrote: Hi All, I am converting a YUGE program over from Perl 5 to Perl 6 (Perl 5's subs drive me INSANE). $ perl6 -c GetUpdates.pl6 ===SORRY!=== Error while compiling /home/linuxutil/CurlUtils.pm6 Variable '$TimeOut' is not declared. Did you

I need regex help

2018-05-10 Thread ToddAndMargo
Hi All, I am trying to convert this over from Perl5: P5: $dir_entry =~ /.*?(\d{1,4}\D\d{1,4}\D\d{1,4}).*${Extension}/; P6: $dir_entry ~~ m/.*?(\d{1,4}\D\d{1,4}\D\d{1,4}).*{$Extension}/; $ perl6 -c GetUpdates.pl6 ===SORRY!=== Unsupported use of {N,M} as general quantifier; in Perl 6

Re: I need regex help

2018-05-10 Thread ToddAndMargo
On Thu, May 10, 2018 at 11:56 PM, ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: Hi All, I am trying to convert this over from Perl5: P5: $dir_entry =~ /.*?(\d{1,4}\D\d{1,4}\D\d{1,4}).*${Extension}/; P6: $dir_entry ~~ m/.*?(\d{1,4}\D\d{1,4

Re: I need regex help

2018-05-10 Thread ToddAndMargo
On 05/10/2018 09:13 PM, ToddAndMargo wrote: On Thu, May 10, 2018 at 11:56 PM, ToddAndMargo <mailto:toddandma...@zoho.com>> wrote:     Hi All,     I am trying to convert this over from Perl5:     P5:     $dir_entry  =~ /.*?(\d{1,4}\D\d{1,4}\D\d{1,4}).*${Extension}/;     P6:     $

Re: I need regex help

2018-05-10 Thread ToddAndMargo
On 05/10/2018 09:26 PM, ToddAndMargo wrote: On 05/10/2018 09:13 PM, ToddAndMargo wrote: On Thu, May 10, 2018 at 11:56 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote:     Hi All,     I am trying to convert this over from Perl5:     P5:     $dir_entry  =~ /.*?(\d{1,4}\D\d{1,

Re: I need regex help

2018-05-11 Thread ToddAndMargo
On 05/11/2018 02:03 AM, Steve Mynott wrote: There is a perl 5 compatible option you can pass to perl 6 regexps. Not sure its 100% and I think it's based on perl5.10 but it could be useful if you wanted to gradually port perl 5 to perl 6. I am going to figure it out if it kills me!

Need help converting from Perl 5

2018-05-13 Thread ToddAndMargo
Hi All, I can't not remember what I did in Perl 5 here and am not having a good time converting it to Perl 6. $ perl -e 'my $A="44.rc0"; if ($A ~~ /(^[0-9,.,a,b,rc]+$)/ ) {print "$1\n";} else {print "\$A = <$A>\n"}' 44.rc0 The actual code is: if ( $Line2 ~~ /(^[0-9,.]+$)/ ) { push ( @WebVer

Re: Need help converting from Perl 5

2018-05-13 Thread ToddAndMargo
On 05/13/2018 09:41 PM, ToddAndMargo wrote: Hi All, I can't not remember what I did in Perl 5 here and am not having a good time converting it to Perl 6. $  perl -e 'my $A="44.rc0"; if ($A ~~ /(^[0-9,.,a,b,rc]+$)/ ) {print "$1\n";} else {print "\$A = <$A&

Re: Need help converting from Perl 5

2018-05-14 Thread ToddAndMargo
El lun., 14 may. 2018 a las 7:08, ToddAndMargo (<mailto:toddandma...@zoho.com>>) escribió: On 05/13/2018 09:41 PM, ToddAndMargo wrote: > Hi All, > > I can't not remember what I did in Perl 5 here and > am not having a good ti

number of letters question

2018-05-14 Thread ToddAndMargo
Hi All, Do we have one of those sweet functions that will allow us to look at a string and give us back the count of how many "letters" and/or "numbers" are in a string? And are decimal points considered numbers or letters? Many thanks, -T

Re: Need help converting from Perl 5

2018-05-14 Thread ToddAndMargo
On 05/14/2018 02:42 AM, JJ Merelo wrote: Maybe this will work use HTTP::UserAgent; my $ua = HTTP::UserAgent.new; $ua.timeout = 10; my $response = $ua.get("https://ftp.mozilla.org/pub/firefox/releases/";); if $response.is-success {     say $response.content ~~ m:g{\> (\d+ \. .+?) \/}; } Hi

Re: number of letters question

2018-05-15 Thread ToddAndMargo
El mar., 15 may. 2018 a las 8:32, ToddAndMargo (<mailto:toddandma...@zoho.com>>) escribió: Hi All, Do we have one of those sweet functions that will allow us to look at a string and give us back the count of how many "letters" and/or "numbers" are

Re: number of letters question

2018-05-15 Thread ToddAndMargo
On 05/15/2018 12:37 AM, JJ Merelo wrote: Hi, El mar., 15 may. 2018 a las 9:31, ToddAndMargo (<mailto:toddandma...@zoho.com>>) escribió: >> El mar., 15 may. 2018 a las 8:32, ToddAndMargo (mailto:toddandma...@zoho.com> >> <mailto:toddandma...@zoho.com &l

Re: number of letters question

2018-05-15 Thread ToddAndMargo
On 05/15/2018 12:57 AM, JJ Merelo wrote: Well, say + "abcrd-12.3.4".comb.grep: // will give you that, but say + "abcñé-12.3.4".comb.grep: // will yield the same result. Roman or other kind of numerals are excluded, though... $ perl6 -e 'say + "abcrd-12.3.4".comb.grep: //;' 9 I don't understan

Re: number of letters question

2018-05-15 Thread ToddAndMargo
On 05/15/2018 02:45 AM, Brent Laabs wrote: Just a quick reminder that matches the underscore, because also does.  If you want to exclude underscores, you can match against /<+alnum-[_]>/.  That adds the alnum character class, but subtracts underscores from it.   Decimal points are definitely

Re: number of letters question

2018-05-15 Thread ToddAndMargo
On 05/15/2018 02:45 AM, Brent Laabs wrote: /<+alnum-[_]>/. What does the `+` do? Is there a was to write that to include decimal points (or any other weird character)?

Need match character help

2018-05-15 Thread ToddAndMargo
Hi All, This should be a "no". What am I doing wrong? $ perl6 -e 'my $x="rd"; if $x~~/<[rc]+[a]+[b]+[.]>/ {say "yes"}else{say "no"}' yes Many thanks, -T

Re: Need match character help

2018-05-15 Thread ToddAndMargo
On 05/15/2018 04:49 AM, ToddAndMargo wrote: Hi All, This should be a "no".  What am I doing wrong? $ perl6 -e 'my $x="rd"; if $x~~/<[rc]+[a]+[b]+[.]>/ {say "yes"}else{say "no"}' yes Many thanks, -T And how do I turn this into a yes

Re: Need match character help

2018-05-15 Thread ToddAndMargo
On 05/15/2018 07:05 AM, Timo Paulssen wrote: On 15/05/18 13:49, ToddAndMargo wrote: Hi All, This should be a "no".  What am I doing wrong? $ perl6 -e 'my $x="rd"; if $x~~/<[rc]+[a]+[b]+[.]>/ {say "yes"}else{say "no"}' yes Many thanks

Re: Need match character help

2018-05-15 Thread ToddAndMargo
On 05/15/2018 07:06 AM, Timo Paulssen wrote: On 15/05/18 14:03, ToddAndMargo wrote: On 05/15/2018 04:49 AM, ToddAndMargo wrote: Hi All, This should be a "no".  What am I doing wrong? $ perl6 -e 'my $x="rd"; if $x~~/<[rc]+[a]+[b]+[.]>/ {say "yes"}el

Re: number of letters question

2018-05-15 Thread ToddAndMargo
On 05/15/2018 10:05 AM, Larry Wall wrote: On Tue, May 15, 2018 at 12:44:12AM -0700, ToddAndMargo wrote: : "abcrd-12.3.4" would be five letters, six numbers, and one : I don't care. Here's another approach: $ p6 '"abcrd-12.3.4".comb.classify(*.unipro

Is there a backward "for @"

2018-05-15 Thread ToddAndMargo
Hi All, This seems like a trivial question, but I really adore the "for" loops. Is there a way to do the backwards? In other words, start at the end of the array and loop to the beginning? Does the "next" and "last" work in this? Inquiring minds want to know! Many thanks, -T

Re: Is there a backward "for @"

2018-05-15 Thread ToddAndMargo
On 05/15/2018 03:31 PM, ToddAndMargo wrote: do the backwards do theM backwards mumble, mumble

Re: Is there a backward "for @"

2018-05-15 Thread ToddAndMargo
On 05/15/2018 03:49 PM, Larry Wall wrote: On Tue, May 15, 2018 at 03:31:07PM -0700, ToddAndMargo wrote: : Hi All, : : This seems like a trivial question, but I really adore : the "for" loops. Is there a way to do the backwards? : In other words, start at the end of the array and loo

Re: Is there a backward "for @"

2018-05-15 Thread ToddAndMargo
On 05/15/2018 04:34 PM, ToddAndMargo wrote: On 05/15/2018 03:49 PM, Larry Wall wrote: On Tue, May 15, 2018 at 03:31:07PM -0700, ToddAndMargo wrote: : Hi All, : : This seems like a trivial question, but I really adore : the "for" loops.  Is there a way to do the backwards? : In o

Re: Is there a backward "for @"

2018-05-15 Thread ToddAndMargo
On 05/15/2018 05:32 PM, Brock Wilcox wrote: Slightly more idiomatic might be `next unless $line`. Interesting! Thank you!

Re: Need match character help

2018-05-18 Thread ToddAndMargo
On 05/18/2018 04:30 AM, The Sidhekin wrote: On Thu, May 17, 2018 at 12:51 PM, Timo Paulssen > wrote: character classes are fundamentally the wrong thing for "phrases", since they describe only a character.   You were right the first time. Your current

Re: Need match character help

2018-05-18 Thread ToddAndMargo
On 05/15/2018 07:05 AM, Timo Paulssen wrote: On 15/05/18 13:49, ToddAndMargo wrote: Hi All, This should be a "no".  What am I doing wrong? $ perl6 -e 'my $x="rd"; if $x~~/<[rc]+[a]+[b]+[.]>/ {say "yes"}else{say "no"}' yes Many thanks

Re: Need match character help

2018-05-18 Thread ToddAndMargo
On 05/18/2018 01:22 PM, ToddAndMargo wrote: To match particular characters. that should have been To match particular characters or phrases I am using "phrase" here in the English language meaning, not the programming meaning

Re: Need match character help

2018-05-18 Thread ToddAndMargo
On Fri, May 18, 2018 at 1:32 PM, ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: On 05/18/2018 01:22 PM, ToddAndMargo wrote: To match particular characters. that should have been To match particular characters or phrases I am using "phras

Re: Need match character help

2018-05-20 Thread ToddAndMargo
On 05/20/2018 10:40 AM, Patrick R. Michaud wrote: On Fri, May 18, 2018 at 03:28:20PM +0200, Timo Paulssen wrote: On 18/05/18 13:30, The Sidhekin wrote:   / ^ <[d..z]>* $/ That's pretty good! Putting the beginning-of-string anchor ^ anywhere but the very start is surely an advanced move :)

Re: Need match character help

2018-05-20 Thread ToddAndMargo
On 05/20/2018 03:14 PM, Patrick R. Michaud wrote: On Sun, May 20, 2018 at 03:02:34PM -0700, ToddAndMargo wrote: On 05/20/2018 10:40 AM, Patrick R. Michaud wrote: On Fri, May 18, 2018 at 03:28:20PM +0200, Timo Paulssen wrote: On 18/05/18 13:30, The Sidhekin wrote:   / ^ <[d

Re: Need match character help

2018-05-20 Thread ToddAndMargo
On 05/20/2018 04:16 PM, yary wrote: PRM's suggestion was "/inverting the entire regex -- i.e., instead of matching finding things that do match, exclude the things that don't ... use !~~ or some similar logic to get the strings wanted/" which IMO is an excellent idea. Your implementation didn't

regex and metacharacters

2018-05-21 Thread ToddAndMargo
Hi All, With the help of the guys on the chat line, I learned something new. How do deal with metacharacter(s) in a regex. To match a metacharacter: "<" and "?" in this example: $ p6 'if "

What is my sub?

2018-05-21 Thread ToddAndMargo
Hi All, I need to know the name of the subroutine I am in. This is the way I use to do it in Perl 5: (my $Name = (caller(0))[3] ) ~~ s{.*::}{}; How do I do it in Perl 6? Many thanks, -T

Re: What is my sub?

2018-05-22 Thread ToddAndMargo
On 05/21/2018 11:21 PM, Siavash wrote: https://www.nntp.perl.org/group/perl.perl6.users/2017/03/msg3423.html On 2018-05-22 06:04:47 GMT, ToddAndMargo wrote: Hi All, I need to know the name of the subroutine I am in. This is the way I use to do it in Perl 5: (my $Name = (caller(0

Re: What is my sub?

2018-05-22 Thread ToddAndMargo
On 05/22/2018 09:34 AM, Elizabeth Mattijsen wrote: On 22 May 2018, at 09:41, ToddAndMargo wrote: On 05/21/2018 11:21 PM, Siavash wrote: https://www.nntp.perl.org/group/perl.perl6.users/2017/03/msg3423.html On 2018-05-22 06:04:47 GMT, ToddAndMargo wrote: Hi All, I need to know the name of

Re: What is my sub?

2018-05-22 Thread ToddAndMargo
On 05/22/2018 09:09 AM, yary wrote: Oh this works too sub my-name-is-Sue () { say "Hi, ", &?ROUTINE.name } my-name-is-Sue; -y Thank you!

Re: What is my sub?

2018-05-25 Thread ToddAndMargo
On 05/21/2018 11:04 PM, ToddAndMargo wrote: Hi All, I need to know the name of the subroutine I am in. This is the way I use to do it in Perl 5: (my $Name = (caller(0))[3] ) ~~ s{.*::}{}; How do I do it in Perl 6? Many thanks, -T Follow up: based on Yary's wonderful a

my keeper on random numbers

2018-05-25 Thread ToddAndMargo
Hi All, This is my keep file submitted for your critique. Many thanks, -T Perl 6: random numbers: `rand` return a positive real number, always less than one: $ p6 'say rand;' 0.268091668368972 Place a number in front of it to get a larger number: $ p6 'say 1000.rand;' 5

Re: my keeper on random numbers

2018-05-26 Thread ToddAndMargo
On 05/26/2018 05:10 AM, Brian Duggan wrote: To convert to an positive integer, use truncate: $ p6 'say 1000.rand.truncate;' 876 or use pick: perl6 -e 'say (^1000).pick' 209 Brian Hi Brian, What does (^1000) mean? -T

Re: my keeper on random numbers

2018-05-26 Thread ToddAndMargo
On 05/26/2018 09:09 PM, Brad Gilbert wrote: On Sat, May 26, 2018 at 10:59 PM, ToddAndMargo wrote: On 05/26/2018 05:10 AM, Brian Duggan wrote: To convert to an positive integer, use truncate: $ p6 'say 1000.rand.truncate;' 876 or use pick: perl6 -e 'say (^

Re: my keeper on random numbers

2018-05-26 Thread ToddAndMargo
On 05/26/2018 09:22 PM, ToddAndMargo wrote: Why the caret in `0..^1000`?  Why not `0..1000`? Figured that one out. The caret means to exclude the last number, so `0..^1000` is the same as `0..999` Thank you!

Re: What is my sub?

2018-05-26 Thread ToddAndMargo
On 05/26/2018 11:32 AM, Larry Wall wrote: On Fri, May 25, 2018 at 07:23:45PM -0700, ToddAndMargo wrote: : Follow up: based on Yary's wonderful advice, this is my keeper : on the subject: : : : : perl6: what is the name of the subroutine you are currently in: : : It is: : &?ROU

Re: What is my sub?

2018-05-26 Thread ToddAndMargo
On 05/26/2018 10:41 PM, Xin Cheng wrote: Hi, Why does anyone want to know the name of the sub inside the sub itself? Is it more interesting to know the name of the calling sub? Thanks! Xin Hi Xin, This program check about 50 web sites to find new revisions of software I need to support my

Re: my keeper on random numbers

2018-05-27 Thread ToddAndMargo
On 05/27/2018 04:29 AM, Brian Duggan wrote: On Sunday, May 27, ToddAndMargo wrote: Why do I sometime see a range written `0..1000` and `0...1000` (three dots)? Two dots makes a Range. Three dots is the sequence operator -- it makes a Seq. ~ $ perl6 -e 'say (0..1000).

Real, Num, Rat question

2018-05-27 Thread ToddAndMargo
Hi All, What is wrong with this picture? Is my type being changed or are "Num" and "Rat" in a subset of "Real"? Also, what do I alter to get ^name to say real? $ p6 'my Real $x= 5e65; say $x.^name' Num $ p6 'my Real $x= 5.5; say $x.^name' Rat Many thanks, -T

Re: Real, Num, Rat question

2018-05-27 Thread ToddAndMargo
> On Sun, May 27, 2018 at 2:49 PM, ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: > > Hi All, > > What is wrong with this picture? Is my > type being changed or are "Num" and "Rat" in > a subset of "Real"? > >

Re: Real, Num, Rat question

2018-05-27 Thread ToddAndMargo
On Sun, May 27, 2018 at 5:50 PM ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: Hi All, What is wrong with this picture? Is my type being changed or are "Num" and "Rat" in a subset of "Real"? Also, what do I alter to get ^name t

Re: my keeper on random numbers

2018-05-27 Thread ToddAndMargo
On 05/27/2018 03:42 PM, Brian Duggan wrote: On Sunday, May 27, ToddAndMargo wrote: Hi Brian, `^name` is sweet. Why the caret? (I realize it won't work without it.) The caret is shorthand for .HOW.name(object), i.e. ~ $ perl6 -e 'say 12.^name'

Re: my keeper on random numbers

2018-05-27 Thread ToddAndMargo
On 05/27/2018 03:42 PM, Brian Duggan wrote: ~ $ perl6 -e 'say 12.HOW.name(12)' Int Does the "12" have to be repeated?

Re: my keeper on random numbers

2018-05-27 Thread ToddAndMargo
On Sun, May 27, 2018 at 7:16 PM ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: On 05/27/2018 03:42 PM, Brian Duggan wrote: > ~ $ perl6 -e 'say 12.HOW.name <http://12.HOW.name>(12)' > Int Does the "12" have to be re

Re: my keeper on random numbers

2018-05-27 Thread ToddAndMargo
On 05/25/2018 09:19 PM, ToddAndMargo wrote: Hi All,     This is my keep file submitted for your critique. Many thanks, -T Perl 6: random numbers: `rand` return a positive real number, always less than one:     $ p6 'say rand;'     0.268091668368972 Place a number in front of

Re: my keeper on random numbers

2018-05-27 Thread ToddAndMargo
est way to do this is to reuse the same object. On Sun, May 27, 2018 at 7:16 PM ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: On 05/27/2018 03:42 PM, Brian Duggan wrote: >       ~ $ perl6 -e 'say 12.HOW.name <http://12.HOW.name>(12)' >       I

Re: my keeper on random numbers

2018-05-27 Thread ToddAndMargo
On 05/27/2018 11:38 PM, ToddAndMargo wrote: On 05/27/2018 04:17 PM, Brandon Allbery wrote: In the long form, yes. That's why the ^ shorthand exists. With the long form you have to start from an object of the same type to get to its metamodel, then pass the object you're actually ask

() can I get away with this?

2018-05-28 Thread ToddAndMargo
Hi All, As the guys o the chat line say, "Death to parenthesis". Can I get away with doing away with parenthesis on these, or does it man something different without the parenthesis? ( $NewRev = $Line ) ~~ s| .* "Version: <\/b>" ||; $NewRev = $Line ~~ s| .* "Version: <\/b>" ||; return ( $a, $

Re: () can I get away with this?

2018-05-28 Thread ToddAndMargo
On 05/28/2018 01:26 AM, ToddAndMargo wrote: Hi All, As the guys o the chat line say, "Death to parenthesis". Can I get away with doing away with parenthesis on these, or does it man something different without the parenthesis? ( $NewRev = $Line ) ~~ s| .* "Version: <\/b>

Re: () can I get away with this?

2018-05-28 Thread ToddAndMargo
On Mon, May 28, 2018 at 1:26 AM, ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: Hi All, As the guys o the chat line say, "Death to parenthesis". Can I get away with doing away with parenthesis on these, or does it man something different with

IO ???

2018-06-03 Thread ToddAndMargo
Hi All, I have a been looking around the docs pages and I am not finding a list of what the various IO functions do. I would like a list of IO.e does this and IO.d does that. Any such list exist? Many thanks, -T -- ~~ Computers are like air conditioners.

need mkdir, chown, chmod, del

2018-06-03 Thread ToddAndMargo
Hi All, I need the Perl6 commands for the following LINUX commands. mkdir make directory chown change ownership chmod change file mode bits deldelete file Many thanks, -T -- ~~ Computers are like air conditioners. They malfunction wh

Re: IO ???

2018-06-03 Thread ToddAndMargo
On Sun, Jun 3, 2018 at 1:01 PM ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: Hi All, I have a been looking around the docs pages and I am not finding a list of what the various IO functions do. I would like a list of IO.e does this and IO.d does that.

Re: need mkdir, chown, chmod, del

2018-06-03 Thread ToddAndMargo
On Sun, Jun 3, 2018 at 1:05 PM ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: Hi All, I need the Perl6 commands for the following LINUX commands. mkdir make directory chown change ownership chmod change file mode bits delde

<> question

2018-06-03 Thread ToddAndMargo
What is this? https://docs.perl6.org/routine/chmod#role_IO chmod 0o755, ; Is it? chmod 0o755, $file1, $file2

Re: need mkdir, chown, chmod, del

2018-06-03 Thread ToddAndMargo
On 06/03/2018 10:08 AM, ToddAndMargo wrote: On Sun, Jun 3, 2018 at 1:05 PM ToddAndMargo <mailto:toddandma...@zoho.com>> wrote:     Hi All,     I need the Perl6 commands for the following LINUX     commands.     mkdir  make directory     chown  change ownership     chmod   

Re: <> question

2018-06-03 Thread ToddAndMargo
https://docs.perl6.org/language/quoting#Word_quoting:_%3C_%3E On Sun, Jun 3, 2018 at 1:42 PM ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: What is this? https://docs.perl6.org/routine/chmod#role_IO chmod 0o755, ; Is it? chmod 0o755, $file1, $file2

Re: need mkdir, chown, chmod, del

2018-06-03 Thread ToddAndMargo
> On Sun, Jun 3, 2018 at 1:47 PM ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: > > > Ah poop! Can't find "chown" On 06/03/2018 10:50 AM, Brandon Allbery wrote: I imagine that'e because it's nearly impossible to implement portably:

Re: need mkdir, chown, chmod, del

2018-06-03 Thread ToddAndMargo
On 06/03/2018 10:04 AM, ToddAndMargo wrote: Hi All, I need the Perl6 commands for the following LINUX commands. mkdir  make directory chown  change ownership chmod  change file mode bits del    delete file Many thanks, -T Would you mind looking over my notes to see if I

Re: <> question

2018-06-03 Thread ToddAndMargo
On 06/03/2018 11:01 AM, Brandon Allbery wrote: Is there something missing in the examples at the link? yes, `` is confusing to me. I can't tell is `<>` is an editorial comment or Perl syntax. Is it chmod 0o755, $f1, $f2; or chmod 0o755 <$f1 $f2>; or either?

Re: <> question

2018-06-03 Thread ToddAndMargo
On 06/03/2018 11:01 AM, Brandon Allbery wrote: Is there something missing in the examples at the link? Well, a bit. When I see chmod 0o755, ; I think `myfile1` and `myfile2` are "functions", not data. I instead look for something like chmod 0o755, < $myfile1 $myfile2 >; or chmod

Is there a built in recursive rmdir and mkdir?

2018-06-03 Thread ToddAndMargo
Hi All, Does Perl 6 have a built in recursive rmdir equivalent to LINUX's `rmdir --parents path`? Also, does Perl6 have a built in recursive mkdir equivalent to LINUX's `mkdir --parents path`? Many thanks, -T

Re: <> question

2018-06-03 Thread ToddAndMargo
On 06/03/2018 01:16 PM, Brandon Allbery wrote: On Sun, Jun 3, 2018 at 4:09 PM ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: $ touch a b c $ p6 'chmod 0o777 < a b c >;' ===SORRY!=== Error while compiling -e Preceding context expects a term, but foun

Re: <> question

2018-06-03 Thread ToddAndMargo
On 06/03/2018 01:25 PM, Patrick Spek via perl6-users wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 The < > syntax is a bit like qw<> from Perl 5. You'll get a List (or Array, not sure which type exactly from it. So is a list with two elements, "myfile1" and "myfile2". If you wan

Re: <> question

2018-06-03 Thread ToddAndMargo
On 06/03/2018 01:31 PM, Brad Gilbert wrote: On Sun, Jun 3, 2018 at 3:08 PM, ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: On 06/03/2018 11:01 AM, Brandon Allbery wrote: Is there something missing in the examples at the link? Well, a bit.  When I see

Re: Is there a built in recursive rmdir and mkdir?

2018-06-03 Thread ToddAndMargo
On 06/03/2018 01:19 PM, Tom Browder wrote: On Sun, Jun 3, 2018 at 3:13 PM, ToddAndMargo wrote: Hi All, Does Perl 6 have a built in recursive rmdir equivalent to LINUX's `rmdir --parents path`? Searching for "rmdir" on the docs site, and selecting the sub rmdir entry, I se

Re: Is there a built in recursive rmdir and mkdir?

2018-06-03 Thread ToddAndMargo
On 06/03/2018 01:28 PM, Patrick Spek via perl6-users wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Sun, 3 Jun 2018 13:13:31 -0700 ToddAndMargo wrote: Does Perl 6 have a built in recursive rmdir equivalent to LINUX's `rmdir --parents path`? For this, there's `rmtr

need second pair of eyes

2018-06-03 Thread ToddAndMargo
Hi All, What am I doing wrong here? $ p6 'lib \'./\'; use RunNoShell; ( my $a, my $b ) = RunNoShell::RunNoShell("ls *.pm6"); say $a;' bash: syntax error near unexpected token `=' Huh ??? This is RunNoShell.pm6 sub RunNoShell ( $RunString ) is export { ... retu

Re: need second pair of eyes

2018-06-03 Thread ToddAndMargo
On Sun, Jun 3, 2018 at 5:28 PM ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: Hi All, What am I doing wrong here? $ p6 'lib \'./\'; use RunNoShell; ( my $a, my $b ) = RunNoShell::RunNoShell("ls *.pm6"); say $a;' b

Re: need second pair of eyes

2018-06-03 Thread ToddAndMargo
On 06/03/2018 02:50 PM, Brandon Allbery wrote: Double quotes, or the one we were just discussing a few minutes ago.     use lib "./";     use lib <./>; The trailing / doesn't do anything useful there, by the way. On Sun, Jun 3, 2018 at 5:48 PM ToddAndMargo <mail

Re: need second pair of eyes

2018-06-03 Thread ToddAndMargo
quot;ls *.pm6"); say $a;' On Sun, Jun 3, 2018 at 4:47 PM, ToddAndMargo wrote: On Sun, Jun 3, 2018 at 5:28 PM ToddAndMargo mailto:toddandma...@zoho.com>> wrote: Hi All, What am I doing wrong here? $ p6 'lib \'./\'; use RunNoShell; ( my

Re: need second pair of eyes

2018-06-03 Thread ToddAndMargo
On 06/03/2018 03:07 PM, Brandon Allbery wrote: I'm still trying to figure out why you have just "lib" instead of "use lib" there. And why it's not throwing an error. As poop! I was mixing Perl 5 and Perl 6. $ p6 'use lib <./>; use RunNoShell; ( my $a, my $b ) = RunNoShell("ls"); say $a;'

Re: need second pair of eyes

2018-06-03 Thread ToddAndMargo
On 06/03/2018 03:06 PM, Brad Gilbert wrote: It's -I. not -I perl6 -I. -MRunNoShell '( my $a, my $b ) = RunNoShell("ls \*.pm6"); say $a;' Could not open ( my $a, my $b ) = RunNoShell("ls \*.pm6"); say $a;. Failed to stat file: no such file or directory

Re: need second pair of eyes

2018-06-03 Thread ToddAndMargo
On Sun, Jun 3, 2018 at 6:06 PM ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: On 06/03/2018 02:54 PM, Brad Gilbert wrote: > You can use q[./] instead of \'./\' > (especially useful so that it will work on both Windows and Unix > > But

Re: need second pair of eyes

2018-06-03 Thread ToddAndMargo
On 06/03/2018 03:25 PM, Brandon Allbery wrote: What do you think the path is? Do you still think after being told twice that the / is necessary? If you must cargo cult then say -I./ instead of -I.. The default "lib" path for perl 6 does not include this directory. perl6 -I./ -MRunNoShell '(

Re: need second pair of eyes

2018-06-03 Thread ToddAndMargo
On Sun, Jun 3, 2018 at 6:22 PM ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: On 06/03/2018 03:07 PM, Brandon Allbery wrote: > I'm still trying to figure out why you have just "lib" instead of "use > lib" there. And why it's

Re: need second pair of eyes

2018-06-03 Thread ToddAndMargo
On Sun, 3 Jun 2018 15:22:17 - -0700 ToddAndMargo wrote: On 06/03/2018 03:06 PM, Brad Gilbert wrote: It's -I. not -I perl6 -I. -MRunNoShell '( my $a, my $b ) = RunNoShell("ls \*.pm6"); say $a;' Could not open ( my $a, my $b ) = RunNoShell("ls \*.pm6"); sa

Re: need second pair of eyes

2018-06-03 Thread ToddAndMargo
On 06/03/2018 03:57 PM, Patrick Spek via perl6-users wrote: It's not that it particularly dislikes it, but you have to think about it in what the options do, and what you want to accomplish. In a regular Perl 6 script, you'd also have to consider the order in which you do a similar thing. First,

Re: need second pair of eyes

2018-06-03 Thread ToddAndMargo
On 0>> On Sun, Jun 3, 2018 at 6:33 PM ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: On 06/03/2018 03:24 PM, Brandon Allbery wrote: > It is allowed if you have 'unit module RunNoShell;' at the top of > RunNoShell.pm6. Otherwise you defin

Re: need second pair of eyes

2018-06-03 Thread ToddAndMargo
On Sun, Jun 3, 2018 at 7:17 PM ToddAndMargo <mailto:toddandma...@zoho.com>> wrote: On 0>> On Sun, Jun 3, 2018 at 6:33 PM ToddAndMargo mailto:toddandma...@zoho.com> >> <mailto:toddandma...@zoho.com <mailto:toddandma...@zoho.com>>> wrote:

<    2   3   4   5   6   7   8   9   10   11   >