Link to home
Start Free TrialLog in
Avatar of jiniasp
jiniasp

asked on

how to replace "@" in a string

how to replace "@" in a string with "\@" without using any modules in cgi script?
ASKER CERTIFIED SOLUTION
Avatar of PaulS_III
PaulS_III

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tintin
Tintin

I'll assume you are talking about a Perl/CGI script, so you can do:

$string =~ s/@/\\@/;

Why do you want to do this anyway?