$ths = ' this is a string'; $i = split(/\s/,$ths); print "$i\n";