Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: dodgy sub

by strat (Canon)
on Feb 27, 2002 at 13:43 UTC ( #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
Node Status?
node history
Node Type: note [id://147897]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2020-11-30 21:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?