start page | rating of books | rating of authors | reviews | copyrights

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: redo Chapter 5
Function Reference
Next: Reference: rename
 

ref

ref $
var

Returns a string indicating the type of the object referenced if var is a reference; returns the null string otherwise. Built-in types include:

REF SCALAR ARRAY HASH CODE GLOB
If the referenced object has been blessed into a package, that package name is returned instead. You can think of ref as a "typeof" operator.


Previous: Reference: redo Perl in a Nutshell Next: Reference: rename
Reference: redo Book Index Reference: rename

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.