#!/usr/bin/perl use strict; use warnings; #edit contains the complete path of the files to be edited my $path = "./edit" ; #geting a file handler open(FL, "$path"); #getting all the file names in the @ARGV so that i can process them chomp(@ARGV = ); # $INPUT_RECORD_SEPARATOR $/=""; # $INPLACE_EDIT $^I=".bak"; while(<>) { s/CONFIDENTIAL(.*?)own\s+risk/ /sm; print ; }