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

[perl #56902] regex utf8 "uninitialized value" error

Thread Next
From:
Father Chrysostomos via RT
Date:
July 27, 2013 06:40
Subject:
[perl #56902] regex utf8 "uninitialized value" error
Message ID:
rt-3.6.HEAD-2552-1374907203-633.56902-15-0@perl.org
On Sun Jul 13 15:30:16 2008, BKB wrote:
> The following script prints lots of erroneous "uninitialized value"
> warnings depending on whether UTF-8 is switched on or off
> 
> #!/usr/bin/perl
> use warnings;
> use strict;
> 
> my $regex =
> "([\x{ff10}-\x{ff19}0-
>   
9]{4}|[\x{5341}\x{516d}\x{4e03}\x{4e5d}\x{4e94}\x{56db}\x{5343}\x{767e}\x{4e8c}\x{4e00}\x{516b}\x{4e09}]?\x{5343}[\x{5341}\x{516d}\x{4e03}\x{4e5d}\x{4e94}\x{56db}\x{5343}\x{767e}\x{4e8c}\x{4e00}\x{516b}\x{4e09}]*)\\s*\x{5e74}";
> my $test = "ABCDEFG";
> if ($test =~ /($regex)/) {
>     print "m:<$1>\n";
> }
> __END__
> 
> If the last character ("\x{5e74}") is removed from the regexp, the
> warning vanishes.

This appears to be fixed in blead.  I suppose it needs a bisect, though.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=56902

Thread Next


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