I am using the following code
once I call this sub procedure, when I try to print something to the screen such as ...
it doesn't work. My script only does the print statements to the screen that are before the sub procedure is called. If I put warnings on, it says that I am trying to print to a filehandle that has been closed.
Any help?
David Pimental
(US, Oh)
Code:
sub replace {
local $^I = '.bak';
my $find = quotemeta(shift) or return(0);
my $replace = shift or return(0);
local @ARGV = shift or return(0);;
while(<>){
s/$find/$replace/;
print;
}
close;
return(1);
}
once I call this sub procedure, when I try to print something to the screen such as ...
Code:
print "working on folder " . $folder . "\n";
it doesn't work. My script only does the print statements to the screen that are before the sub procedure is called. If I put warnings on, it says that I am trying to print to a filehandle that has been closed.
Any help?
David Pimental
(US, Oh)