l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
April 21: Google Glass
Next Installfest:
TBD
Latest News:
Mar. 18: Google Glass at LUGOD's April meeting
Page last updated:
2001 Dec 30 17:04

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] A question of perl style
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] A question of perl style



On Mon, Apr 30, 2001 at 11:25:28AM -0700, Micah Cowan wrote:
> On Mon, Apr 30, 2001 at 11:17:06AM -0700, Jay Strauss wrote:
[...]
> Pretty much, yeah - except that Perl doesn't have pointers.  But if
> you meant reference, that's absolutely correct.
> 
> In fact, this is always the case, since Perl's definition of an object
> is a reference (any kind, but usually a hashref) that has been
> "blessed" into a class.

Micah pretty much said it. Jay: have you even programmed in C? If you
haven't, you might find that reading up on C and pointers would explain a lot
of the questions you have about perl references.

Pointers are variables that don't hold interesting data, but instead hold the
address in the machine's memory where the interesting data may be found. The
main value in this is that you can (1) dynamically store any amount of data,
limited only by available memory, organized however you like, and (2) you can
pass large chunks of data around without the inefficiency of making a
complete copy.

References in Perl are a safer version of C pointers. While (1) above is a
nonissue in perl, (2) is essential for most serious programming. Hence the
need to use references in Perl.

-- 
Henry House
OpenPGP key available from http://hajhouse.org/hajhouse.asc


LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!