pack function

2016-07-29 Thread TS xx
Hi there, I am trying to translate some old perl 5 code and I am having trouble with a particular line. I used to have this in perl 5 to translate multibyte encoding like "%C3%A1": $value =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack("C", hex($1))/eg; And I have translated the regex to something like

Re: Need help with Nil values

2016-02-22 Thread TS xx
Thanks Brandon, That was what I was looking for. I'm trying it already. Regards, Emiliano From: Brandon Allbery Sent: Tuesday, February 23, 2016 2:21 AM To: TS xx Cc: perl6-us...@perl.org Subject: Re: Need help with Nil values On Mon, Feb 22, 2016

Re: Need help with Nil values

2016-02-22 Thread TS xx
Thanks, That was it. Somtimes I get confused with the way other languages treat undefined/null/nil values. Regards, Emiliano From: Timo Paulssen Sent: Tuesday, February 23, 2016 2:20 AM To: perl6-us...@perl.org Subject: Re: Need help with Nil values He

Need help with Nil values

2016-02-22 Thread TS xx
Dear perl 6 users, I am trying to pass a Nil value to a method new of a class that expects a Str. The method new will assign this Nil value to a Str member variable. Then, this value will change during runtime. At the moment I am getting this error: Type check failed in binding $value; expec

RE: Constants as members of a class

2015-12-18 Thread TS xx
Thanks Liz, I will stick with the method aproach. Regards, Emiliano > Subject: Re: Constants as members of a class > From: l...@dijkmat.nl > Date: Fri, 18 Dec 2015 23:49:53 +0100 > To: perl6-us...@perl.org > > > On 18 Dec 2015, at 23:37, TS xx wrote: > > > &

RE: Constants as members of a class

2015-12-18 Thread TS xx
> > On 12/18/2015 03:46 AM, TS xx wrote: > > Hello dear perl6 users, > > > > I was in the need of declaring a member variable as a constant integer. > > I don't understand this. If it's a constant, why does it need to be > member at all? A member is

RE: Constants as members of a class

2015-12-18 Thread TS xx
Hi Liz, thanks for your reply. Can I call the method from static context? I mean: MyClass.FOO > Subject: Re: Constants as members of a class > From: l...@dijkmat.nl > Date: Fri, 18 Dec 2015 10:23:11 +0100 > To: perl6-us...@perl.org > > > > On 18 Dec 2015

RE: Constants as members of a class

2015-12-18 Thread TS xx
need that "new" method. Second -- yes, this is a very old interpreter. I unfortunately don't know about the twigil variable constant things. --Brock On Thu, Dec 17, 2015 at 9:46 PM, TS xx wrote: Hello dear perl6 users, I was in the need of declaring a member variable as a con

Constants as members of a class

2015-12-17 Thread TS xx
Hello dear perl6 users, I was in the need of declaring a member variable as a constant integer. After many syntax tryouts I came to this one: class MyClass { has int $.myConst; method new () { return self.bless(); } submethod BUILD () { constant $!myConst = 1;

How to call a super class method?

2015-10-27 Thread TS xx
Hello fellow perl users, I have been trying to understand perl 6 oop implementation, and one thing I still can't figure out is how to call super class methods from lower classes. Let's say we have two classes, Person and Employee, and the method I am trying to access is the object constructor: