#!/usr/bin/perl #edit contains the complete path of the files to be edited my $path = "/home/rjs/heena/edit" ; #geting a file handler open(FL, "$path"); #getting all the file names in the @array so that i can process the file one by one my @array = ; while ( my $array = shift @array) { my $file = $array; @ARGV = ($file); # $INPUT_RECORD_SEPARATOR $/=""; # $INPLACE_EDIT $^I=".bak"; print "all fine \n "; while(<>) { # nothing seems to happen after this piece of code s/CONFIDENTIAL(.*?)own\s+risk/ /sm; print ; } }