sudhindra k s wrote:

Hi

I have a line as shown below:

//abc/... (<sometext>)

Now i want to substitute (<sometext>) with blank space. How do i do it.


my $string = '//abc/... (<sometext>)'; $string =~ s/\(\<sometext\>\)//; print $string;

I tried s/\(\Q<sometext>\)//g. This isnt working.

Next i have a line as below

//abc#4.

Now i want an output //abc. So how do i remove the numeric value and the preceding #?


my $string = '//abc#4'; $string =~ s/\#\d$//; print $string;


perldoc perlre is nice.

I also use perl via CLI (perl -e 'test code here') to work out things like this at times.

HTH :)

Lee.M - JupiterHost.Net

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to