develooper Front page | perl.perl5.porters | Postings from September 2005

case folding problem on z/OS

rajarshi das
September 28, 2005 08:13
case folding problem on z/OS
Message ID:
Here's a case folding test :

$a = '0178';
$b = '00FF';

$a1 = pack("U0U*", hex $a);
$b1 = pack("U0U*", map { hex } split " ", $b);

if (":$b1:" =~ /:[$a1]:/i) {
print "ok\n";

The above fails on z/OS (on perl-5.8.6).
However, if I remove the colon characters from the
test, i.e. 
if ("$b1" =~ /[$a1]/i) {
print "ok\n";
then it works fine. 

Any thoughts on why the colon characters cause the
regexp to fail ? also, any pointers to locate the
problem area in the code would be helpful.

Thanks in advance,

Yahoo! Mail - PC Magazine Editors' Choice 2005 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About