[thelist] Re: str_replace equivalent in Perl?
eduardobk at via-rs.net
eduardobk at via-rs.net
Fri Feb 20 06:59:26 CST 2004
case sensitive: $foo =~ s/foo/bar/case insensitive: $foo =~ s/foo/bar/iEduardo Bacchi Kienetz>Hi all,
>
>Is there an equivalent of PHP's str_replace function in perl? I've
>googled it and found some mentions of it but they don't seem to work how
>they should. Hadn't even looked at perl before monday but I'm working it
>out as I go for this assignment we're doing.
>
>I have data coming as POSTDATA from a form, and the text fields values
>are coming through as word+word2, i.e. all spaces between letters are
>replaced with a +. this is standard, and I'd do a:
>
>str_replace ("+", " ", $variable_name);
>
>in PHP - can someone be so kind as to explain how to do it in perl?
>
>thanks,
>Dave
More information about the thelist
mailing list