Why use dollar sign $ for variables

M

Michele Dondi

Or, stated another way, most of the power of Objective-C is in the
libraries, and the language is pretty much just the glue that holds
the library calls together. Much of the power of Perl is in the core
language. Because of this, any tool such as sigils on variables that
makes Perl code easier for humans to parse and understand --
regardless of the ease with which computers may parse and understand
it -- is useful.

Good point!


Michele
 
I

Ian Wilson

vali said:
or maybe even better:
foreach $color (@colors){...}
^

I sometimes write code like
my @colours = qw(red blue green);
print "The colour at offset 1 is $colour[1] \n";

These help
use warnings;
use strict;

But maybe Perl 7 will be sufficiently clever to
use plurals;

:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top