Questions about this topic? Sign up to ask in the talk tab.

Perl/Basics/Variables and Data Types/Scalars

From NetSec
Revision as of 03:09, 16 July 2012 by AlizaLorenzo (Talk | contribs) (Created page with "Scalars in perl are prefixed with a '''$'''. A scalar may contain any string, integer, or floating point value. It may also contain a reference pointer. An example declaration:...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Scalars in perl are prefixed with a $. A scalar may contain any string, integer, or floating point value. It may also contain a reference pointer. An example declaration:

<syntaxhighlight lang="perl">my $message = "Hello world!\n"; print $message;</syntaxhighlight>