in reply to How do I remove all of the blank spaces in a string?

Use a regexp:
$batch_date =~ s/\s//g;

Or, if you want to keep the old value in input variable:
($new_var = $batch_date) =~ s/\s//g;


-mk