in reply to using unpack

@a = unpack(A10 x ((length$some_string)/10),$some_string)

Replies are listed 'Best First'.
Re: Re: using unpack
by greenFox (Vicar) on Apr 18, 2001 at 05:21 UTC

    which loses characters if the string length is not an exact multiple of 10 (may not be a problem in this case?) One solution-

    my @a = unpack('A10' x (length($string)/10) . 'A' . length($string)%10 +,$string);

    --
    my $chainsaw = 'Perl';