develooper Front page | perl.perl5.porters | Postings from July 2013

Fwd: Re: RFC: $/="\R"; perl -0R

From:
Lukas Mai
Date:
July 15, 2013 16:48
Subject:
Fwd: Re: RFC: $/="\R"; perl -0R
Message ID:
51E427BC.2060301@gmail.com
Oops, apparently I forgot to p5p.


-------- Original Message --------
Subject: Re: RFC: $/="\R";  perl -0R
Date: Mon, 15 Jul 2013 18:43:20 +0200
From: Lukas Mai <plokinom@gmail.com>
To: Karl Williamson <public@khwilliamson.com>

On 15.07.2013 17:30, Karl Williamson wrote:
>
> I propose to allow $/ to be settable to a special value that indicates
> to use the official Unicode record separators.

> Setting
>
>      $/ = "\R";
>
> would be the programmatic way of doing this.  This, however, is legal to
> do now, setting the separator to a capital letter R, but it raises a
> warning: "Unrecognized escape \R passed through".

What would "\R" mean? I.e. what would be returned for length("\R"),
ord("\R"), sprintf("%vd", "\R")?

I believe

     $/ = \"R";

is "available" - in the sense that it introduces no new syntax/values;
it just introduces another value that is meaningful in $/.

-- 
Lukas Mai <plokinom@gmail.com>





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About