Using the Perl split() function - perlmeme.org The split() function is used to split a string into smaller sections. ... In this example we print 'aa' either side of the values so we can see where the split took place: