- or download this
$envfile="/root/env.properties";
@envFile=<$env>;
open my $env, '<', $envfile or die "Can't read old file: $!";
- or download this
open my $in, '<', $file or die "Can't read old file: $!";
open my $out, '>', "$file.new" or die "Can't write new file: $!";
- or download this
...
foreach $envline (@envFile){
while ( <$in> ){
- or download this
print "$. $_";
if($envline =~/$DOMAIN_DB_CONN_STR=.*:1521:.*/ && $_=~/$DOMAIN
+_DB_CONN_STR=.*:1521:.*/){
- or download this
print "\nMatch";
$line=$_;
$line =~ s/$DOMAIN_DB_CONN_STR=.*:1521:.*/NUANCE_DB_CO
+NN_STR=$dbhost:$dbport:$dbschema/;
- or download this
print $out $line;
}
}
}
- or download this
use strict;
use warnings;
...
}
}
}