Hi all,
I have a bunch of C++ source files that contain the string
PCN: sometext
where somtext is an arbitary sequence of characters.
Whenever the text "PCN:" occurs, I want to remove it and everything else
to the end of the line.
To do this, I have written the following script:
while(<>)
{
my $current_line;
$current_line = $_;
$current_line =~ s/PCN:[.]*//g;
print $current_line;
}
However this only removes the "PCN:" part, leaving the rest of the
string that occurs between the PCN: and the new-line undisturbed. Is
there some way that I can tell perl that I want it to remove everything
from PCN: onwards to the end of the line?
thanks heaps guys
David Buddrige.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- Re: Removing text to the end of the line. David Buddrige
- Re: Removing text to the end of the line. David Buddrige
- Re: Removing text to the end of the line. John W. Krahn