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

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

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

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/" >> ".*//;

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? > >> > >> $

[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" ~~

[perl #132103] [JVM] A lot of tests for $! seem to fail

2017-09-24 Thread Christian Bartolomaeus via RT
On Mon, 18 Sep 2017 14:00:02 -0700, barto...@gmx.de wrote: > On Sat, 16 Sep 2017 08:46:00 -0700, barto...@gmx.de wrote: > > Here is a simple example: > > > > $ ./perl6-j -e 'try { die "foo" }; say $!.perl; say $!.gist' > > X::AdHoc.new(payload => "foo") > > Died > > in block at -e line 1 > >