in reply to How do I pull n characters off the front of a string?

my ($x,$y) = ( $string =~ /^(.{$n})(.*)$/ );

Originally posted as a Categorized Answer.