How do I extract selected columns from a string?

Use substr or unpack, both documented in the perlfunc manpage.