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

help with substitution

Thread Next
From:
Erik Browaldh
Date:
December 11, 2002 01:09
Subject:
help with substitution
Message ID:
3DF6FD67.3090701@pool.informatik.rwth-aachen.de
Hi everyone, thanks for the help last time!

if I have two strings
$word="cows";

and another given string:
$givenword="XXX-"; #with the same length as $word !!!

what I want to do is transform "XXX_"  --> "cow-"

I have tried but cant figure out going characterwise, all I get in the 
end is like this:
$givenword="cowscowscows-"

thanks in advanced!

Erik





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