Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: dodgy sub

by strat (Canon)
on Feb 27, 2002 at 13:43 UTC ( [id://147897]=note: print w/replies, xml ) Need Help??


in reply to dodgy sub

maybe you could try swapping hello and hi?
$string = str_replace("Hello", "Hi", "Hello My Name Is Elfyn");
Besides, if there are strange chars in $find ( \, +, *, (, [ or the like), better write:
$what =~ s/\Q$find/$replace/;
Otherwise, you may get nasty errors

Best regards,
perl -le "s==*F=e=>y~\*martinF~stronat~=>s~[^\w]~~g=>chop,print"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://147897]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-19 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found