NYIMI Jose (BMB) wrote:
> ...
> I was thinking about unpack function but how to make it dynamic ?
> 
> I mean writing :
> my @items = unpack('A2 A2', $str);
> Will work for $str='abdc';
> Not for $str='abcdef';

How about something like:

   my $s = 'abcdefghij';
   my @x;
   ([EMAIL PROTECTED],$s) = unpack('a2 a*', $s) while length $s;
   print "@x\n";

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

Reply via email to