in reply to How do I pull n characters off the front of a string?
my ($x,$y) = ( $string =~ /^(.{$n})(.*)$/ ); [download]
Originally posted as a Categorized Answer.