in reply to splitting a sequence using unpack

The x operator has nothing to do with unpack. It creates strings (in scalar context). In this case, it's used to create as many 'a3's as needed. However, that's unnecessary - you could use "(a3)*" as first argument to unpack as well.

As for the format of unpack, it tells unpack what's in the string (second argument), and how to "unpack" it. And 'a' means, "an ASCII character". The '3' means, three of them. The star means, as many as needed. So, '(a3)*' means, split the following string into pieces of three.

Alternatively (and what I would have done, being more of a regex person than an unpack one), you could use a regex:

@triplets = $seq =~ /[actg]{3}/g;