David Buddrige wrote:
>
> Hi all,
Hello,
> 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 th
Hi all,
Once again - I figured it out... here is the updated script:
while(<>)
{
my $current_line;
$current_line = $_;
$current_line =~ s/PCN:.*//g;
print $current_line;
}
It worked after I took out the square brackets - although I am not sure
why - since the square brackets *
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(<>)
{