sub getNth { my $nth = shift; my $index = $width * $nth; substr $_[0], $index, $width; }