If all your requirement is to remove the space then
$string =~ s/\s
should be fine
if you only want to filter the index-4 item leave other as it is then try the following example
$line="A,01/01/1900,12/30/9999, 2AB9500,A9,8999,BNVV";
@arr=split /\//, $line;
$arr[4] =~ s/\s//g;
$line=join "/", @arr;
print $line."\n";