in reply to Re^2: giving spaces
in thread giving spaces

If you use use strict; use warnings; you will probably find an error in this statement that has nothing to do with spaces. I suspect that you intend $i to be a subscript. If so,
print " $arrayA[$i] $arrayB[$i] ";
Note: \s is special character class for regular expressions. It does not have the same meaning in a string. Just use space characters.
Bill