[snip]
> On FreeBSD, I get:
>
> % perl -e 'use bytes; for(0..256) { $s.=chr($_) } for(split(//,$s)) { print }'
>
>
>
>
>!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ
>
>¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍ
Thanks for the reponses,
See below:
- Original Message -
From: "Wiggins d'Anconia" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, December 28, 2002 3:28 PM
Subject: Re: split error
> The original posted perl line worked fine on my RH8.0 b
The original posted perl line worked fine on my RH8.0 box.
~$ perl -e 'for(0..256) { $s.=chr($_) } for(split(//,$s)) { print }'
123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øù
Hi Shawn
I'll stick my neck out and say that this is a bug in Perl, to do with
Unicode support. Running the loop from 0..256 gives you 256 8-bit characters
and one 16-bit character (0x0100 = 256). This seems to upset split() as it
stands. Try adding:
use bytes;
at the start of your code, and
It may have something to do with what shell you are running under.
I ran it under a korn shell(MKS) w2k and id one at 1590 characters and had
no problem. From some other emails I have seen, the shell may allow only so
much to happen.
What are you running under?
Wags ;)
-Orig