[CODE=perl]@sql = ('SV_userLogin. sql','sv_getDB_ cmpCnt_r3m.sql' ,'sv_getDB_cmpC nt.sql','sv_get DB_Corp_Trgt.sq l','sv_getDB_sc ore.sql','sv_ge tDB_Top25_cmpCn t.sql','sv_getD B_Top25_score.s ql','sv_getOrgN ameById.sql');
my $prn;
foreach ( @sql )
{
my $line = $_;
if($line =~ s/^(\S+).sql$/$1/)
{
print "$line\n";
open(FILE,"c:/perl-scripts/sample.pl");
my @arr = <FILE>;
my $arrlines;
foreach ( @arr )
{
$arrlines = $_;
if($arrlines =~ /\$line/)
{
#print $sqlname."\n";
$prn .= "\n\t".$arrline s;
}
}
}
}
print $prn;[/CODE]
In the above program its not printing the lines which contain the <sqlname> from the sample.pl programs.
Can any one please help me where I have done the wrong?
my $prn;
foreach ( @sql )
{
my $line = $_;
if($line =~ s/^(\S+).sql$/$1/)
{
print "$line\n";
open(FILE,"c:/perl-scripts/sample.pl");
my @arr = <FILE>;
my $arrlines;
foreach ( @arr )
{
$arrlines = $_;
if($arrlines =~ /\$line/)
{
#print $sqlname."\n";
$prn .= "\n\t".$arrline s;
}
}
}
}
print $prn;[/CODE]
In the above program its not printing the lines which contain the <sqlname> from the sample.pl programs.
Can any one please help me where I have done the wrong?
Comment