K
Kapil Khosla
Hi,
I am trying to match the expression
#brace.txt
int main()
{
return main();
}
in a file but am getting stuck somewhere. This is the code I could write till now.
open I, "E:\\mycode\\perl\\brace.txt";
while($line = <I>)
{
$line =~ s/int main\(\)\s*\{return\s*main\(\)\;\s*\}/matched/ ;
print $line;
}
close I;
Where am I going wrong? Please help,
Thanks,
Kapil
I am trying to match the expression
#brace.txt
int main()
{
return main();
}
in a file but am getting stuck somewhere. This is the code I could write till now.
open I, "E:\\mycode\\perl\\brace.txt";
while($line = <I>)
{
$line =~ s/int main\(\)\s*\{return\s*main\(\)\;\s*\}/matched/ ;
print $line;
}
close I;
Where am I going wrong? Please help,
Thanks,
Kapil