About us Privacy Disclaimer Contact us
FAQ Help Advertising Feedback
Home Sitemap Search Donate us

  Home > Computer & I'net > Quotes...

   Browse by title articles:
   What is hot:

Perl/CGI Intro

CHMOD

Perl Basics

Scalar Data

Quotes

Uploading

Files - 1
Escape Code
Pitfalls of Web Redesign
The Web Page Width Dilemma
 1 23456Next articles



Quotes


Computer & I'net articlesQuotes

by David Stanley    



It is important to note that DOUBLE quotes " and SINGLE quotes ' can have a very different effect in PERL.

Single quotes are literal. They will pass on exactly what is inside of them. Conents are not analyzed for variables.

EXAMPLE :
$myname="David";
print 'Hello World! My name is David';
print 'Hello World! My name is $myname';
RESULTS :
Hello World! My name is David
Hello World! My name is $myname

Double quotes are interpolated (valued or formulated). Variables will be analyzed for values.

EXAMPLE :
$myname="David";
print "Hello World! My name is David";
print "Hello World! My name is $myname";
RESULTS :
Hello World! My name is David
Hello World! My name is David

Now as long as my name is David (which it is) then that is all there is to know about quotes. One does not check for values, and the other one does.




-----------------

Article by David Stanley. Visit his site http://www.htmlite.com. Reprinted with permission.






Articles

Auto & Trucks

Business

Computer & I'net

  ·General

  ·Apache

  ·CSS

  ·Database

  ·Hardware

  ·HTML

  ·Javascript&DHTML

  ·Linux

  ·MySQL

  ·Operating System

Perl / CGI

  ·PHP

  ·Programming

  ·Publishing

  ·Search Engines

  ·Software Problems

  ·SSI

  ·Tips & Tricks

  ·Utilities

  ·Web Design

Family

Food & Drink

Gardening

Health

Other

Pets

Psychology

Spiritual

Travel

Women

 Calculators

Balance Sheet




  Disclaimer | Privacy | Terms of useCopyright © 2004 Nice2know.com