Assuming $x contains a line of your input file,
$x =~ s/[\[\]]//g;
should do the trick
In reply to Re: regex problem by adso in thread regex problem by amoura