in reply to How to put special characters($, @, #) into a field name?

Either use single quotes to prevent any interpolation of variables: $ascalar='myemail@gmail.com' or use double quotes and escape the sigils: $ascalar="myemail\@gmail.com"

See also perldata

Replies are listed 'Best First'.
Re^2: How to put special characters($, @, #) into a variable?
by neverminda (Novice) on May 26, 2007 at 21:49 UTC
    Thanks, tried many times and finally got it as you said $ascalar = "myemail\@gmail.com". Would you pleas look at the update question? Thanks a lot.

      Do not completely change the node title and contents. Either post a related follow up question in reply or create a new question.

      The OP title and contents were:

      Title: How to put special characters($, @, #) into a variable?

      Content:

      Hi, Monks: Did a search and didn't come up with anything so I am asking you perl monks here. How can I put a special character into a variable? Say I want $ascalar="myemail@gmail.com". I can't get the value I want since perl thinks @gmail as an array. Please help how I can get this done. Thanks. --neverminda

      DWIM is Perl's answer to Gödel