#!/usr/bin/perl use strict; use File::Copy; use warnings; my $open_file= "C:/oracle/ora81/network/ADMIN/SQLNET.ORA"; my $write_file=">>C:/oracle/ora81/network/ADMIN/SQLNET.ORA"; open(IN,$open_file) || die "cannot open $open_file $!"; open(OUT,$write_file) || die "cannot create $write_file $!"; while () { if ($_ = /^SQLNET\.AUTHENTICATION_SERVICES=\ \(NTS\)$/){ print "\#\ ^SQLNET\.AUTHENTICATION_SERVICES=\ (NTS)"; print OUT $_ "\#\ SQLNET\.AUTHENTICATION_SERVICES=\ (NTS)"; #Want to write the 2nd string print ... to OUT write handle #OUT $_ } } #### String found where operator expected at ora.pl line 22, near "$_ "\#\ SQLNET\.AUTHENTICATION_SERVICES=\ (NTS)"" (Missing operator before "\#\ SQLNET\.AUTHENTICATION_SERVICES=\ (NTS)"?) syntax error at ora.pl line 22, near "$_ "\#\ SQLNET\.AUTHENTICATION_SERVICES=\ (NTS)"" Execution of ora.pl aborted due to compilation errors.