in reply to Remove field inside [ ] brackets
Note: Code untested and may not even be the right way to do this.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);
EDIT: Looks like someone found the solution while I was typing this.
|
|---|