no, I want to use one of Crypt modules which expacts to be passed strings of
n*16 bytes. How do I go about genereting such blocks ??

Mark

----- Original Message -----
From: "Paul Johnson" <[EMAIL PROTECTED]>
To: "Mark Goland" <[EMAIL PROTECTED]>
Cc: "perl" <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 5:24 AM
Subject: Re: byte count


> On Sat, Jan 04, 2003 at 05:06:44AM -0500, Mark Goland wrote:
>
> > hi , I am having a hard time matching n bits at a time. basicly I have a
> > string which can be X bytes long, I want to creat an array of N bytes
long.
> > So lets say X=23 and N=5, I would have an array of 5, for of which would
be
> > 5 bytes long. Any idea's ?? are there any modules that can split up
strings
> > like this ??
>
> Are you looking for something like this?
>
> $ perl -MData::Dumper -e '@a = shift =~ /(.{1,5})/g; print Dumper \@a'
abcdefghijklmnopqrstuvw
> $VAR1 = [
>           'abcde',
>           'fghij',
>           'klmno',
>           'pqrst',
>           'uvw'
>         ];
>
> --
> Paul Johnson - [EMAIL PROTECTED]
> http://www.pjcj.net
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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

Reply via email to