in reply to How do I find "@" in a string variable?
say, I have a string variable:
Unfortunately you don't, because Perl will try to interpolate an array named @dumdum in that double-quoted string. If you have a single-quoted string, or if you have read that string from elsewhere, then this point is moot.
To escape the @, use a regular expression such as:
$email =~ s/@/\@/g;However, I'm not sure what you're doing in that this is a problem; can you give us more detail on the full problem you want to solve? I suspect that there's probably a much easier solution here.
|
|---|