I am writing a perl script and I am trying to read two diff files..
first file
open my $data1, "<", "/tmp/CSI_to_PROD_111111_20141004_225038/att_application.properties"
or die "Unable to open prod file";
while (<$data1>) {
chomp();
foreach $line (<$data1>) {
next if ( $line =~ /(^\s*#|^$)/ );
chomp($line);
foreach $token (@csitokens) {
if ( $line =~ /$token=/ ) {
my ( $tok, @val ) = split( /=/, $line, 2 );
print "@val\n";
}
}
}
}
close($data1) or warn "Not able to close fil: \n";
second file
open my $data2, "<", "/opt/app/d1ebl1m5/dv02/cingbt02/J2EEServer/config/AMSS/application/properties/att_application.properties_try"
or die "unable to open file: $!";
while (<$data2>) {
foreach $line1 (<$data2>) {
print "$line1";
}
}
close($data2) or warn "Not able to close fil: \n";
The loop for first file is working fine and displaying the output but the second loop doesnt display anything..