#!/usr/bin/perl use strict; use warnings; use String::Substrings; my @trip = substrings 'AGRTGAXWXX', 6; print "$trip[0]\n";