in reply to Re: splice an array
in thread splice an array
LINE: while ( defined( $_ = <$Rlog> )) { s/^Alert Level\s0*(?:[3-9]|\d{2,})/(?!.*Log Entry)/DEREK!!!!\n$&/s +; } continue { print $Plog $_; }
but keep getting this error:
ORDER OF print new code where arrows are.Bareword found where operator expected at foo line 12, near "s/^Alert +Level\s0*(?:[3-9]|\d{2,})/(?!.*Log Entry)/DEREK!!!!" Backslash found where operator expected at foo line 12, near "DEREK!!! +!\" syntax error at foo line 12, near "s/^Alert Level\s0*(?:[3-9]|\d{2,})/ +(?!.*Log Entry)/DEREK!!!!!" Execution of foo aborted due to compilation errors.
Log Entry 10: 06 Feb 2011 10:36:26 ---> Alert Level 2: Informational ---> Keyword: Type-02 127002 1208322 Soft Reset Logged by: Baseboard Management Controller; Sensor: System Event 0x204D4E79AA0200B0 FFFF027000120300
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: splice an array
by toolic (Bishop) on May 04, 2011 at 13:01 UTC | |
|
Re^3: splice an array (alternate delimiters)
by Anonymous Monk on May 04, 2011 at 13:24 UTC | |
by dbs (Sexton) on May 04, 2011 at 17:31 UTC | |
by dbs (Sexton) on May 04, 2011 at 17:48 UTC | |
|
Re^3: splice an array
by Anonymous Monk on May 04, 2011 at 12:57 UTC |