##UNTESTED use strict; use warnings; my $string = 'the/article book/noun he/pronoun is/verb ill/adjective'; my @array = split( '/', split( /\s+/, $string ) );