in reply to Re^3: No matching
in thread No matching
The code is as following:
36 my $prefixSysDescr = quotemeta 'system.sysDescr.0 : DISPLAY + STRING- (ascii): '; ...... 53 for ( $sysDescr ) { 54 /\Q$prefixSysDescr\E/ && do { 55 $sysDescr =~ s/$prefixSysDescr//; 56 print $sysDescr, "\n"; 57 Pause(__LINE__); 58 s/^$prefixSysDescr//g; 59 last; 60 }; 61 /^$prefixSnmpWalk/ && do { 62 Pause(__LINE__); 63 $sysDescr =~ s/^$prefixSysDescr//g; 64 last; 65 }; 66 # $sysDescr = $sysDescr . " " . $sysDescr; 67 } 68 print $sysDescr; 69 Pause(__LINE__); ...
The script runs straight to line 68. If I omit \Q and \E it matches
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: No matching
by Anonymous Monk on Sep 03, 2009 at 11:15 UTC | |
by o_chfa (Acolyte) on Sep 03, 2009 at 11:35 UTC | |
by shmem (Chancellor) on Sep 03, 2009 at 20:35 UTC |