I have to extract few lines from 16MB file. I wrote a funcion for this purpose.
The starting line looks like this "*|NET min_msb_led[0] 0.0103148PF" and the last line to be extracted is "blank line".
I enter the "min_msb_led[0]" from key board, function returned "/^\*\|NET\smin_msb_led\0\/". It looks ok for me.
Here is some stuff from my main program.
.
.
.
$net_extract = name_modify($net);
.
.
.
ABC: while (<IN1>)
{
#print "entered into while loop\n";
if ($_ =~ $net_extract)
{
$count = 1;
print "hello\n";
}
.
.
.
Its entering into "while" loop but, "if" condition is not
satisfied.
Can any body tell me what is going wrong with this code.
I can use array to read the line and compare with the input,
but this is taking lot of time to execute the code.
Chinna
In reply to Can we use variable for pattern match and extraction by ask_chinna
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |