codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Difference between " " and ` ` in PERL  mansi752 at 13:50 on Wednesday, February 22, 2006
 

I have a PERL script in which i assign an email address to a string.
I have issues when I include the email-address in double quotes,but it works when I include it between single quotes.

Can anyone explain the behaviour of such a scenario?

  Re: Difference between  paradug at 18:22 on Saturday, February 25, 2006
 

In Perl, if you use single quotes the string is taken verbatum. It will not intepret embedded special characters as having special Perl meaning. When you use double quotes special characters will be intepreted as their Perl meaning. For example, '\n' will be \n but "\n" will be new line. In your case, the @ symbol is being intepreted as an array. Here is an example:
'john@aol.com' is inteperted as john@aol.com
"john@aol.com" is interperted as
string = john plus
an array named aol.com
You can use double quotes by putting a \ before the special character. In your case,
"john\@aol.com" = john@aol.com












CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: need help
•  Saving DOM modifications on Page refresh
•  Regular expression in javscript - pls help
•  Re: need help with event please..
•  help Plz....
•  ASP with MYSQL
•  how to receive emails using CDONTS in ASP
•  Need to use C++/COM to add document to FileNET
•  Re: Do - While loop


Recent Articles
What is a pointer in C?
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net


© Copyright codetoad.com 2001-2006