o_chfa has asked for the wisdom of the Perl Monks concerning the following question:
Hi there,
I have following substring at the beginning of an output
I want to remove it. As it is only one substring to be removed, I do a kind of case structure like this:
for ( $sysDescr ) { /^$prefixSysDescr/ && do { s/^$prefixSysDescr//; last; }; } # end of case
Neither /../ && do { ..}; nor substitue s/..//; matches as expected. Any idea? thx 4 help
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: No matching
by shmem (Chancellor) on Sep 03, 2009 at 08:16 UTC | |
by o_chfa (Acolyte) on Sep 03, 2009 at 08:58 UTC | |
by Anonymous Monk on Sep 03, 2009 at 09:10 UTC | |
by o_chfa (Acolyte) on Sep 03, 2009 at 09:24 UTC | |
by Anonymous Monk on Sep 03, 2009 at 11:15 UTC | |
| |
|
Re: No matching
by tmharish (Friar) on Sep 03, 2009 at 08:21 UTC | |
by o_chfa (Acolyte) on Sep 03, 2009 at 09:11 UTC | |
|
Re: No matching
by grizzley (Chaplain) on Sep 03, 2009 at 08:03 UTC |