my $test = "[a,b],c,'d',[e,[f,g,h,[i,j],k,l],m,n],o,p"; my @array = eval ( $test );