in reply to not getting desired output
You need to change:
if($line =~ /Handling NSPAdvice for mechanism [4]/) {
to
if($line =~ /Handling NSPAdvice for mechanism \[4\]/) {
because the character [ is special in a regular expression.
Update: Your logic in the statement:
if ($errorCode != 0 || $errorCode != 1) {
is flawed because an $errorCode with any number will pass this test. You probably meant:
if ($errorCode != 0 && $errorCode != 1) {
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: not getting desired output
by namishtiwari (Acolyte) on Jun 11, 2009 at 15:46 UTC |