Hi all
i am facing problem in the regex when is substitute a variable in the text.
here is the code
@output contains lot of data the in which i am looking is as follows
i am not why it is failing, if i dont append the $phver in the last then it is finding.
can some one help in this regards?
i am facing problem in the regex when is substitute a variable in the text.
here is the code
Code:
$ver = 1.92 (i get it dynamically) my $patternph = 'Configuration file '. "\"phone1\.cfg\"" ." is from template phone1\.cfg, revision "."$phver" ; foreach my $val (@output) { if ($val =~ /\Q$patternph\E/) { $phcount++; }elsif($val =~ /\Q$patternsip\E/) { $sicount++; } }
Code:
69|0723111807|cfg |*|02|Prm|Configuration file "phone1.cfg" is from template phone1.cfg, revision 1.92
can some one help in this regards?
Comment