confusing no. of bytes in $1 (z/OS, perl-5.8.6)

[email protected] (rajarshi das)
Newsgroups perl.unicode
Message-ID <[email protected]>
I run the following script :

$a = 160;
$b = 256;

for ($i=$a;$i<=$b;$i++)
{
  $str = join '', $str, pack 'U*', $i;
}

if ($str =~ /(\p{inlatin1supplement}+)/)
{
  print "\$1 : $1\n";
}

on redirecting above o/p to od -tc -tx, $1 has 2 bytes
for all matching code point values (160-255).

If the above test is repeated with $a = 192, $b = 256,
$1 has 1 byte for all matching code point values
(192-255).

Why is this so ? 

Thanks in advance,
Rajarshi.


		
__________________________________ 
Discover Yahoo! 
Find restaurants, movies, travel and more fun for the weekend. Check it out! 
http://discover.yahoo.com/weekend.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.