in reply to Remove field inside [ ] brackets

Can you just remove all brackets and write the data to a new file?
open(DPSLOTFILE, "< c:\\test.txt") or die "Can't open file: $!"; while ( <DPSLOTFILE> ) { my $buffer .= $_; } $buffer =~ s/\[|\]//g; close DPSLOTFILE; open(NEWFILE, ">+C:\\output.txt"); print NEWFILE $buffer; close(NEWFILE);
Note: Code untested and may not even be the right way to do this.

EDIT: Looks like someone found the solution while I was typing this.