my @ind = (0,3,1,6,7,0,1,3,5,3,0,1,3,4,2,0,3,3,5,3,0); my $ind = ''; vec( $ind, $_, 4) = $ind[$_] for 0 .. $#ind; print length $ind; #print 11