Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

confusing no. of bytes in $1 (z/OS, perl-5.8.6)
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.

 ________________________________________
_________________________
Millions of marriage proposals.
http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Find your match on
BharatMatrimony.com


Report this thread to moderator Post Follow-up to this message
Old Post
Rajarshi Das
06-06-05 08:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:43 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.