rich.wilder has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I'm trying to eliminate some extraneous text from lines from a list file. The lines are read into $_ and I want to change a line like so:
clrf __pbssCOMRAM& (0+255),c
to:
clrf __pbssCOMRAM,cSo I need to substitute the string '& (0+255)' with ''.
I've tried:
s/& (0+255)//; s/'& (0+255)'//; s/"& (0+255)"//; s/q(& (0+255))//;
All with the same end result: no substitution takes place. Other simpler substitutions work like:
s/,/, /;
gives the expected result
clrf __pbssCOMRAM& (0+255), c
Please help!
Richard
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Arguments to substitution question
by davido (Cardinal) on Sep 12, 2015 at 03:24 UTC | |
by rich.wilder (Initiate) on Sep 12, 2015 at 03:32 UTC | |
by ramachandrajr (Novice) on Sep 12, 2015 at 10:48 UTC | |
by ramachandrajr (Novice) on Sep 12, 2015 at 10:57 UTC |