Hi,
El sáb., 2 feb. 2019 a las 7:48, ToddAndMargo via perl6-users (<
perl6-users@perl.org>) escribió:
> Hi All,
>
> How do I use chr inside a regex. In the below, how
> do I get rid of $y?
>
> $ p6 'my Str $x=chr(0x66)~chr(0x77); my Str $y=chr(0x66)~chr(0x77);
> $x~~s/ $y /xy/; say $x;'
>
> If w
Hi All,
How do I use chr inside a regex. In the below, how
do I get rid of $y?
$ p6 'my Str $x=chr(0x66)~chr(0x77); my Str $y=chr(0x66)~chr(0x77);
$x~~s/ $y /xy/; say $x;'
xy
Many thanks,
-T
On 2/1/19 8:26 PM, ToddAndMargo via perl6-users wrote:
On 2/1/19 8:07 PM, ToddAndMargo via perl6-users wrote:
On 2/1/19 8:03 PM, ToddAndMargo via perl6-users wrote:
> On Fri, Feb 1, 2019 at 9:37 PM ToddAndMargo via perl6-users
> wrote:
>>
>> On 2/1/19 7:22 PM, ToddAndMargo via perl6-users
On 2/1/19 8:07 PM, ToddAndMargo via perl6-users wrote:
On 2/1/19 8:03 PM, ToddAndMargo via perl6-users wrote:
> On Fri, Feb 1, 2019 at 9:37 PM ToddAndMargo via perl6-users
> wrote:
>>
>> On 2/1/19 7:22 PM, ToddAndMargo via perl6-users wrote:
>>> Hi All,
>>>
>>> On a type Buf, what do I u
On 2/1/19 8:03 PM, ToddAndMargo via perl6-users wrote:
> On Fri, Feb 1, 2019 at 9:37 PM ToddAndMargo via perl6-users
> wrote:
>>
>> On 2/1/19 7:22 PM, ToddAndMargo via perl6-users wrote:
>>> Hi All,
>>>
>>> On a type Buf, what do I use to check for the
>>> position of a byte pattern?
>>
> On Fri, Feb 1, 2019 at 9:37 PM ToddAndMargo via perl6-users
> wrote:
>>
>> On 2/1/19 7:22 PM, ToddAndMargo via perl6-users wrote:
>>> Hi All,
>>>
>>> On a type Buf, what do I use to check for the
>>> position of a byte pattern?
>>>
>>>
>>> Many thanks,
>>> -T
>>
>>
>> Basically, what am I doing
`eq` is string equality
`==` is numeric equality
a Buf is neither.
You want `eqv` (equivalent)
$b[2..4] eqv (0x90,0x00,0x04)
On Fri, Feb 1, 2019 at 9:37 PM ToddAndMargo via perl6-users
wrote:
>
> On 2/1/19 7:22 PM, ToddAndMargo via perl6-users wrote:
> > Hi All,
> >
> > On a type Buf, what
On 2/1/19 7:37 PM, ToddAndMargo via perl6-users wrote:
On 2/1/19 7:22 PM, ToddAndMargo via perl6-users wrote:
Hi All,
On a type Buf, what do I use to check for the
position of a byte pattern?
Many thanks,
-T
Basically, what am I doing wrong here?
$ p6 'my $handle=open("filever.exe", :bin,
>
> On Fri, Feb 1, 2019 at 9:22 PM ToddAndMargo via perl6-users
> wrote:
>>
>> Hi All,
>>
>> On a type Buf, what do I use to check for the
>> position of a byte pattern?
>>
>>
>> Many thanks,
>> -T
On 2/1/19 7:35 PM, Brad Gilbert wrote:
This would work:
my $b = Buf.new( 0,0,0, 1, 2, 0 );
On 2/1/19 7:22 PM, ToddAndMargo via perl6-users wrote:
Hi All,
On a type Buf, what do I use to check for the
position of a byte pattern?
Many thanks,
-T
Basically, what am I doing wrong here?
$ p6 'my $handle=open("filever.exe", :bin, :ro); my Buf $b; $b=
$handle.read(5); say $b; say $b[2
This would work:
my $b = Buf.new( 0,0,0, 1, 2, 0 );
my $match = Buf.new( 1, 2 );
$b.rotor( $match.elems => 1 - $match.elems ).grep(* eqv $match.List, :k)
If you only need the first one, swap out `grep` for `first`
Another iffy option is to decode it as latin1
$b.decode('latin1'
Hi All,
On a type Buf, what do I use to check for the
position of a byte pattern?
Many thanks,
-T
On 2/1/19 6:24 PM, ToddAndMargo via perl6-users wrote:
On 2/1/19 4:26 PM, ToddAndMargo via perl6-users wrote:
On 2/1/19 10:02 AM, Timo Paulssen wrote:
On 01/02/2019 01:33, Bruce Gray wrote:
To call those Windows APIs in Perl 6, you would use NativeCall.
Don't forget that Todd wanted to use
On 2/1/19 4:26 PM, ToddAndMargo via perl6-users wrote:
On 2/1/19 10:02 AM, Timo Paulssen wrote:
On 01/02/2019 01:33, Bruce Gray wrote:
To call those Windows APIs in Perl 6, you would use NativeCall.
Don't forget that Todd wanted to use this on non-windows with not-wine.
NativeCall on linux w
On 2/1/19 10:02 AM, Timo Paulssen wrote:
On 01/02/2019 01:33, Bruce Gray wrote:
To call those Windows APIs in Perl 6, you would use NativeCall.
Don't forget that Todd wanted to use this on non-windows with not-wine.
NativeCall on linux won't run windows code all by itself.
That said, wine is
On 01/02/2019 01:33, Bruce Gray wrote:
> To call those Windows APIs in Perl 6, you would use NativeCall.
>
Don't forget that Todd wanted to use this on non-windows with not-wine.
NativeCall on linux won't run windows code all by itself.
That said, wine is still a good source for info on how windo
16 matches
Mail list logo