Mooch a regex

2016-01-11 Thread ToddAndMargo

Hi All,

Would yo all terribly mind if I ask how to do this Perl 5 regex
in Perl 6?  (I learn best by example.)



if ( $ClickLine =~ /aes256/ and /${BaseTag}/ ) {
  push ( @WebClickHere, $ClickLine );

   if ( $Line =~ m{select id=\"(.*?)[-]} ) {
  my $VerLine = $1;
  push ( @WebVersions,  $VerLine );
   }
}


Many thanks,
-T

--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~




Re: perl 6 for rhel?

2016-01-11 Thread Darren Duncan
Red Hat is quite conservative.  Usually what happens in situations like this 
when you want more up to date stuff you get it from alternate repositories that 
make Red Hat compatible packages.  See also repositories for Fedora or Cent OS. 
-- Darren Duncan


On 2016-01-10 11:16 PM, ToddAndMargo wrote:

On 01/10/2016 11:05 PM, Brandon Allbery wrote:

On Mon, Jan 11, 2016 at 2:02 AM, ToddAndMargo > wrote:

Anyone know if Perl 6 will be available for Red Hat Enterprise
Linux 7 any time soon?


That's up to Red Hat. Considering that they refuse to fix their Perl 5
packaging which has been fundamentally broken (not to mention ancient)
throughout EL5 and EL6, don't hold your breath.


I posted I posted

https://bugzilla.redhat.com/show_bug.cgi?id=1297077
https://bugzilla.redhat.com/show_bug.cgi?id=1296363

but no response back




Re: order of input using Capture

2016-01-11 Thread Philip Hazelden
You're passing `a` as a named arg, and `e` as a positional arg. .list only
returns the positional args, and .elems only counts those. You can use
.hash to get the named args. Alternatively, if you replace `a=>1` with
`(a=>1)` or `'a'=>1`, it should show up in the .list and .elems counts.

See: http://doc.perl6.org/type/Capture

On Mon, Jan 11, 2016 at 3:56 PM mt1957  wrote:

> L.s.
>
> I've seen that the order of input to a Capture is not kept. Is this a bug?
>
> REPL interaction;
>
>  > my Capture $c = \(a=>1,10,{w=>2},[2,3],(e=>2),(b=>3,),Buf.new(^3))
> \(10, {:w(2)}, [2, 3], :e(2), (:b(3),), Buf.new(0, 1, 2), :a(1))
>
>  > for $c.list -> $item { $item.WHAT.say;}
> (Int)
> (Hash)
> (Array)
> (Pair)
> (List)
> (Buf)
>
> Last item is missing, a pair :a(1). $c.elems reports 6 elements. I'm not
> sure but there was a bug report about it I believe.
>
> Greetings
> Marcel Timmerman
>


order of input using Capture

2016-01-11 Thread mt1957

L.s.

I've seen that the order of input to a Capture is not kept. Is this a bug?

REPL interaction;

> my Capture $c = \(a=>1,10,{w=>2},[2,3],(e=>2),(b=>3,),Buf.new(^3))
\(10, {:w(2)}, [2, 3], :e(2), (:b(3),), Buf.new(0, 1, 2), :a(1))

> for $c.list -> $item { $item.WHAT.say;}
(Int)
(Hash)
(Array)
(Pair)
(List)
(Buf)

Last item is missing, a pair :a(1). $c.elems reports 6 elements. I'm not 
sure but there was a bug report about it I believe.


Greetings
Marcel Timmerman