develooper Front page | perl.perl5.porters | Postings from December 2002

Re: [perl #18915] array assignment works correctly only in debugger

Thread Previous | Thread Next
From:
hv
Date:
December 29, 2002 20:05
Subject:
Re: [perl #18915] array assignment works correctly only in debugger
Message ID:
200212300406.gBU46bo32450@crypt.compulink.co.uk
Nicholas Clark <nick@unfortu.net> wrote:
:It's a utf8 regexp bug - I think something to do with the swash code.
:It's still unsolved in the development version (tested with 18251)
:
:Your program should work if you unset $LANG (or change it to something that
:isn't UTF8) - not a fix, but hopefully an acceptable workaround.
:
:The smallest case I can get it down to is:
:
:#!/usr/bin/perl -w
:
:for my $a (0,1) {
:  $_ = 'readin,database,readout';
:  if ($ARGV[0])  {
:    $_ .= chr 256;
:    chop;
:  }
:  /(.+)/;
:
:  my @d = split /[,]/,$1;
:  print join (':',@d), "\n";
:}
:__END__
:
:Without any arguments (not utf8) I see:
:
:readin:database:readout
:readin:database:readout
:
:with $ARGV[1] true, I see:
:
:#adin:database:readout
:readin:database:readout

This appears to have been fixed by one or more of Sarathy's patches
18355-8.

Hugo

Thread Previous | 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