Right now, it splits on // i.e. nothing, so splits apart every charatcter. And joins together on "" i.e. nothing, so puts them back together with nothing inbetween.
/ / and " " would split/sort on spaces and put them back together with spaces inbetween.
Of course, using split / /, $x would hold 'david3' and 'david1' as two elements of a list. But that alone would not be sufficient. Upon sorting this list, the output would be a simple alphabetic sort meaning if the list were to contain 'david3' and 'david10' (in this order), the simply sorted list would contain 'david10' and 'david3' (in this order).
Either write your own sub-routine to sort alpha-numeric strings or use the Sort::Naturally module of perl.
An example:
#! /usr/bin/perl -w
use strict;
use Sort::Naturally 'nsort';
my $var = 'david10 david3';
my @x = split / /, $var;
print join (' ', (nsort @x));