in reply to removing square brackets

Hi,
perl -lpi.bak -e 's/[\[\]\s]//g' files*

Regards,
svenXY