my $string = "a=b c=d"; my @array = map { split /(=)/ } split /\s/, $string;