in reply to Re: using unpack
in thread using unpack

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';

Replies are listed 'Best First'.
Re: Re: Re: using unpack
by I0 (Priest) on Apr 24, 2001 at 11:34 UTC