On Saturday, May 11, 2002, at 03:09 , Beau E. Cox wrote:

> Hi -
>       There must be an easy way to do this...but I can't figure it out. I 
> want to
> create a buffer of 8-bit bytes (to send to an external C++ application). 
> The
> perl script creates values 0 <= value <= 255 (it's 8 bit audio data) and 
> I
> want to put them into a perl scalar to pass to my C++ routine(s). I know 
> I
> have to pass the scalar length also beacuse I cannot depend upon a NULL
> terminator.

have you paused to scope on

        perldoc -f pack

and you didn't really make it clear if you wanted that as a
signed or unsigned bit bucket....

some playing in that space would be:
http://www.wetware.com/drieux/CS/lang/Perl/Beginners/Sys/packBytes.txt

ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to