Need a second pair of eyes

2017-09-24 Thread ToddAndMargo
1: #!/usr/bin/env perl6 2: 3: say "Full file name <$?FILE;> 4: 5: my $IAmFrom; 6: $IAmFrom = $?FILE; 7: $IAmFrom ~~ \.*/||; 8: say "IAmFrom <$IAmFrom>"; $ /home/linuxutil/FileTest.pl6 ===SORRY!=== Error while compiling /home/linuxutil/FileTest.pl6 Variable '$IAmFrom' is not declared at /hom

Re: overwrite?

2017-09-24 Thread ToddAndMargo
On 09/24/2017 11:23 PM, ToddAndMargo wrote: write you t ^^ out

Re: overwrite?

2017-09-24 Thread ToddAndMargo
On 09/24/2017 10:57 PM, Brandon Allbery wrote: On Mon, Sep 25, 2017 at 1:41 AM, ToddAndMargo > wrote: I suppose I should say at this point that the purpose of the file is to be a single line with the date the program was last run in it. If the current d

[perl #132156] [LTA] Suggest polymod for bases > 36 (9123607.base(37))

2017-09-24 Thread via RT
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #132156] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132156 > Code: say 9123607.base(37) Result: base argument to base out of rang

Re: overwrite?

2017-09-24 Thread Brandon Allbery
On Mon, Sep 25, 2017 at 1:41 AM, ToddAndMargo wrote: > I suppose I should say at this point that the purpose of the file > is to be a single line with the date the program was last run > in it. If the current date's month and the month in the file > differ, it triggers an event in my program.

Re: overwrite?

2017-09-24 Thread ToddAndMargo
On 09/24/2017 10:23 PM, ToddAndMargo wrote: On 09/23/2017 12:34 PM, Brandon Allbery wrote: On Sat, Sep 23, 2017 at 2:34 AM, ToddAndMargo > wrote: I see ":truncate". This seems liek it will do the trick. Problem: I would like to read from the file first bef

Re: overwrite?

2017-09-24 Thread ToddAndMargo
On 09/23/2017 12:34 PM, Brandon Allbery wrote: On Sat, Sep 23, 2017 at 2:34 AM, ToddAndMargo > wrote: I see ":truncate". This seems liek it will do the trick. Problem: I would like to read from the file first before truncating (ro). Is there a way

Re: chaining substitutions?

2017-09-24 Thread ToddAndMargo
On Sat, Sep 23, 2017 at 3:54 PM, ToddAndMargo > wrote: >> Hi All, >> >> Question. Can I chain these two substitutions together? >> >> $ perl6 -e 'my $x="State : abc "; $x ~~ s/.*?" : "//; $x ~~ s/" >> ".*//; say "<$x>";' >> >>

Re: chaining substitutions?

2017-09-24 Thread yary
Here's another solution: my $x="State : abc "; $x = $x.subst(/.*?" : "/, "").subst(/ " "+ /,""); say "<$x>"; # -y On Sat, Sep 23, 2017 at 3:54 PM, ToddAndMargo wrote: > >> Hi All, > >> > >> Question. Can I chain these two substitutions together? > >> > >> $ perl6 -e 'my $x="State

[perl #131079] [SECURITY] regex injection allows arbitrary execution using dynamic method lookup

2017-09-24 Thread Brian S. Julin via RT
On Sat, 23 Sep 2017 06:59:18 -0700, b...@abrij.org wrote: > On Thu, 30 Mar 2017 05:41:29 -0700, lloyd.fo...@gmail.com wrote: > > my $regex-from-user = '{ shell "/bin/sh" }'; > > try say "foo" ~~ /<$regex-from-user>/; # won't work > > $regex-from-user = '<::(shell "/bin/sh")>'; > > try say "foo" ~~