develooper Front page | perl.beginners | Postings from April 2002

Remove a character from a string

Thread Next
From:
Vitor Carlos Flausino
Date:
April 2, 2002 09:51
Subject:
Remove a character from a string
Message ID:
3CA9EFE6.5030805@dti.pga.pt
Hi!
I'm trying ro remove the charactes '<' and '>' a string. How do I do it?

what is wrong with...

$sender=~tr/</d;


*sorry* if is a stupid line....


----------------
from the beginig....
is there any *smart* of puting all characters in lowrecase and at the 
same time remove the characters I want...


if ($line=~ /^.+: SMTP-Accept:.+:(.+):(\d+):\d+:(.+)$/) {
                 ($sender=$1)=~tr/A-Z/a-z/;
                 $sender=~tr/>/d;
			...

in one step....

Thkx,

-vcf


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About